Reputation: 15
I need to get a responce message from a service and print that message using batch file. I need to stop a windchill service and get that message and prints it, If service is properly stopped then I need to start the windchill service..
windchill stop
timeout /t 10
windchill start
Above code will stop and start the service with Buffer time. But I need to get the message after service is stopped and prints that that message. and only if the service is properly stopped then i need to start my service.
Upvotes: 0
Views: 142
Reputation:
Ok, So I do not have windchill
to see the results.
But as per the previous question's updated answer:
windchill stop
:wait
timeout /t 5 >nul 2>&1
windchill status | find /I "stopped"
if %errorlevel% equ 0 (
echo windchill successfully Stopped
windchill start
goto :eof
)
goto :wait
```
Upvotes: 1