Whenever you run the VSS command line, it sets the exit code to indicate its running status. You can use this operating system variable in batch files, scripts, and macros to react based on what happened when you ran VSS.
The exit code is set as follows:
Code | Description |
100 | Something went wrong. For example, VSS could not find its data files, or a file you want to check out is already checked out. |
1 | Indicates a milder sort of failure, and occurs in three circumstances:
When you run ss Dir and no items are found. When you run ss Status and at least one item is checked out. When you run ss Diff, and at least one file is different. All of these circumstances indicate that your next VSS command may fail, even though this command ran successfully. |
0 | VSS executed successfully. |