Click here to Skip to main content
15,885,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How to make a wait in batch file for a windows service to stop and then execute next command? I am able to stop service but unable to execute move command.
Here is my code :
IF EXIST ..\Temp\UpdateService.exe (
  SC stop UpdateService
  :pause
  tasklist | find /i "sc.exe" >nul
  if not %errorlevel%==1 goto :pause
      move ..\Temp\UpdateService.exe  ..\Tools\Update
  SC start UpdateService

  ) ELSE (
      echo filename. missing.
  )
Posted
Updated 6-Sep-11 21:16pm
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900