<p>I'm trying to script the shutdown of my VM Servers in a .bat.
if one of the vmware-cmd commands fails (as the machine is already shutdown say), I'd like it to continue instead of bombing out.</p>

<pre><code>c:
cd "c:\Program Files\VMWare\VmWare Server"

vmware-cmd C:\VMImages\TCVMDEVSQL01\TCVMDEVSQL01.vmx suspend soft -q
vmware-cmd C:\VMImages\DevEnv\DevEnv\DevEnv.vmx suspend soft -q
vmware-cmd C:\VMImages\DevEnv\TCVMDEV02\TCVMDEV02.vmx suspend soft =q


robocopy c:\vmimages\ \\tcedilacie1tb\VMShare\DevEnvironmentBackups\ /mir /z /r:0 /w:0

vmware-cmd C:\VMImages\TCVMDEVSQL01\TCVMDEVSQL01.vmx start
vmware-cmd C:\VMImages\DevEnv\DevEnv\DevEnv.vmx start 
vmware-cmd C:\VMImages\DevEnv\TCVMDEV02\TCVMDEV02.vmx start
</code></pre>

[{'answer_id': 74304, 'author': 'Jen A', 'author_id': 12979, 'author_profile': 'https://Stackoverflow.com/users/12979', 'pm_score': 2, 'selected': False, 'text': '<p>Have you tried using "start (cmd)" for each command you are executing?</p>\n'}, {'answer_id': 74314, 'author': 'Burkhard', 'author_id': 12860, 'author_profile': 'https://Stackoverflow.com/users/12860', 'pm_score': 0, 'selected': False, 'text': '<p>You could write a little Program that executes the command an returns a value (say -1 for an error). This value can then be used in your Batch-File.</p>\n'}, {'answer_id': 74321, 'author': 'chakrit', 'author_id': 3055, 'author_profile': 'https://Stackoverflow.com/users/3055', 'pm_score': 6, 'selected': True, 'text': '<p>Run it inside another command instance with <code>CMD /C</code></p>\n\n<pre><code>CMD /C vmware-cmd C:\\...\n</code></pre>\n\n<p>This should keep the original BAT files running.</p>\n'}, {'answer_id': 74376, 'author': 'bastos.sergio', 'author_id': 12772, 'author_profile': 'https://Stackoverflow.com/users/12772', 'pm_score': 0, 'selected': False, 'text': '<p>A batch file should continue executing, even if the previous command has generated an error.  Perhaps, what you are seeying is the batch aborting due to some other error?</p>\n'}, {'answer_id': 74502, 'author': 'kenny', 'author_id': 3225, 'author_profile': 'https://Stackoverflow.com/users/3225', 'pm_score': 3, 'selected': False, 'text': '<p>If you are calling another batch file, you must use CALL batchfile.cmd</p>\n'}]
['https://Stackoverflow.com/questions/74267', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11538/']