I want that when this command runs
Code: Select all
w32tm /resync
and it should generate error message for all other quotes then this below.
The command completed successfully.
So I know it did not worked successfully and needs my attention.
Thanks
Moderator: DosItHelp
Code: Select all
w32tm /resync
The command completed successfully.
Code: Select all
w32tm /resync | find /i "The command completed successfully." >nul || an error occurred&pause
foxidrive wrote:Do you want to detect the message?
Code: Select all
:loop
w32tm /resync | find /i "The command completed successfully." >nul ||Msg * Clock Not working.......
goto loop
Code: Select all
@echo off
:loop
echo Attempting Time Sync...
w32tm /resync | find /i "The command completed successfully." >nul || echo Sync Not Working, Retrying...&goto loop
echo Success!!!!!
pause
exit
Code: Select all
@echo off
:loop
echo Attempting Time Sync...
w32tm /resync | find /i "The command completed successfully." >nul || (echo Sync Not Working, Retrying...&goto loop)
echo Success!!!!!
pause
exit