Link to home
Start Free TrialLog in
Avatar of Ted Penner
Ted PennerFlag for United States of America

asked on

Determine when process is completed

I have a batch file with syntax such this and I need to verify that all processes are complete. How can I adjust the syntax or otherwise verify success?
\\Location\Ccmsetup.exe SMSSITECODE=wtx SMSCACHESIZE=5120 SMSCONFIGSOURCE=U PATCH=\\Filepath.msp;Filepath.msp;\\Filepath.msp

Open in new window

Avatar of NVIT
NVIT
Flag of United States of America image

> ...verify that all processes are complete.
Are you saying when this is run, it does not continue on the next line until Ccmsetup.exe complete?
Or, does it continue to the next line and each .msp is running on its own process?

If the first, many .exe programs return an error code. You can check as follows:
\\Location\Ccmsetup.exe SMSSITECODE=wtx SMSCACHESIZE=5120 SMSCONFIGSOURCE=U PATCH=\\Filepath.msp;Filepath.msp;\\Filepath.msp
set result=%errorlevel%
echo %result%
pause

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Does the batch script can be executed as part of the startup script ?