This is a command line program.
MUST be run within a command window as administrator.
VSS is designed to allow you to mount a volume shadow copy as a drive letter. There are a number of programs on the web which allow you mount shadow copies. This is just another one, which we hope will be useful.
As always, the program MUST be run as administrator.
The one item about this program which is unique, is that it will allow you mount a sequence of shadows with little or no user intervention. However, it is a command line program, so you do have to know how to tipe. :-)
VSS takes command line arguments from the user and attempts to mount the shadow to a drive letter. As we know, there may be a number of shadow copies. The program has the capability to mount (or unmount) more than one shadow at a time. It is dependant on the user command line input.
The program reads the command line and processes (mounts or unmounts shadows) depending on the content of the command line. As of August 8, 2012, the program was made intelligent enough to be able to determine the users intention (provided the command line is entered correctly), and take action based on the items it finds on the command line.
The program is aware of proper command line syntax and can take appropriate actions based on the items or command line syntax. The MOUNT and UNMOUNT keyword are phased out in the August 6, version, but are kept for backward compatability. The MOUNT and UNMOUNT keywords, if used in the command line syntax must be upper case when used.
When mounting drives, two files are created. One named MOUNTED_LOG.TXT and the UNMOUNT_LOG.BAT are created in the default directory. The MOUNTED_LOG.TXT contains a record of the drive letters mounted. This can be later used to unmount the drives. (see below explanation). The UNMOUNT_LOG.BAT is a batch file containing a script to unmount the drives mounted. It can be run to automatically unmount the drives that have been mounted.
The basic command line for vss is:
Item 1: (optional, and outdated) word MOUNT or UNMOUNT which will direct which operation to run. As of August 6, 2012, don't bother with these.
The MOUNT command line items for item 2 and 3.
For MOUNTING the drives
Item 1: the starting drive letter (with colon) to mount to. This would be
something like: E: (user uppercase please, and must include the colon)
NOTE: IF THE DRIVE LETTER IS OMITTED AND THE ONLY ITEM IS THE SHADOW VOLUME IDENTIFIER, THEN THE PROGRAM WILL AUTOMATICALLY ATTEMPT TO START THE MOUNTING AT DRIVE E:. SEE THE FIRST COMMAND LINE EXAMPLE BELOW FOR THE SYNTAX WITHOUT A STARTING DRIVE LETTER.
Item 2: the vssadmin identifier of the first shadow to mount. Like:
The index number (in this case 3), can be modified in the traditional grouping to include other shadow indexes. To include single indexes, seperate with commas, 3,4,5 etc. To include groupings or ranges, seperate with dashes (-), 9-15. So an entire command line item might look like:
If the last item on the mounting command line is the word "ASK", upper case, then the user is asked to confirm the next mount before each one is added. If no "ASK" is used, then the mounting is without user interaction. Use this option sparingly, as it hasn't been fully tested. (feedback is requested).
For UNMOUNTING the drives
The UNMOUNT command line item is
Item 1: the drive letter(s), with colons, and no spaces, of the drives to UNMOUNT. (ie: E:F:G:H:), or
Item 1: The filename of the MOUNTED_LOG.TXT file created during mounting. The program detects a filename, and assumes all the contents are the drives to unmount. The file contains a single line with the drive letters, seperated by colons. E:F:G:H:....
If the program encounters only a single item on the command line, and that item is the file containing the drives to unmount, then it will unmount those drives. The format of the unmount file is a single line, with the drive letters designated in order, separated with the colon. For example: E:F:G: etc. no spaces, only a single line. The command would be vss MOUNTED_LOG.TXT. This would unmount all drives in the file.
Finding the volume shadow names using VSSADMIN
Use the vssadmin command to list the shadow volumes the system has knowledge of. This
vssadmin command will show a number of items relating to each volume shadow set. But the one
we are looking for is the Device line containing the Device\Harddisk... info.
Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3
After receiving this information on the command line, the program attempts to mount the shadow number 3, to the drive letter E:.
Command line format:
C:>VSS E: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3 (best syntax)
C:>VSS E: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3,4,7-10
C:>VSS [MOUNT] E: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3
C:>VSS [MOUNT] E: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3,4,5,9
C:>VSS [MOUNT] E: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3,4,5,9 ASK
When mounting multiple index values, you can use comma seperators for individual indexes, or bracket the indexes with a dash x-xx
Make sure the indexes are lowest to highest. If not, the result is unspecified.
When mounting, if you do not include the first drive letter to mount, (as in the first example), the program attempts to mount the first letter as E:. Assuming that most systems have a CD-DVD set as D:. No D: can ever be mounted with this version. Then the program proceeds to mount the drive letters using E: (or the letter provided on the command line by the user) as the first drive letter to mount. If there are more than one needed then successive drive letters are mounted. If it encounters a drive letter that is already in use, it skips that drive letter, and proceeds to the next unused drive letter. So if you needed four drives to mount, E-H, and G: was already in use, you would get E:, F:, H:, I: mounted. And a message that G: was being skipped.
C:>VSS E:F:G:... (best syntax)
C:>VSS [UNMUONT] E:
C:>VSS [UNMOUNT] E:F:G:H:etc.
When unmounting more than one drive letter, add successive drive letters. Do not use spaces, but the colons (:) are requireed.