Tech Support Guy banner

Solved: Perform PSExec 3 times in case of failure using for loop 2) logic to write

3051 Views 0 Replies 1 Participant Last post by  Phanikiran
Perform PSExec 3 times in case of failure using for loop
HI foxidrive how can we implement the below requiement in the code below

1) Perform PSExec 3 times in case of failure using for loop
2) logic to write in to database .

echo psexec -n 300 -h -s \\%%a cmd /c "title %%a&hostname&echo Running Simple Update...&cd \localbin\&supdate -%1">>C:\Temp\%%a.cmd
echo if %%ERRORLEVEL%% NEQ 0 echo.Error in performing the psexec on %%a on %%date%% %%time%% ^>^>"SimpleUpdateLogs/SimpleupdateErrorlogfile - %%date:/=-%%.txt">>C:\Temp\%%a.cmd
echo if %%ERRORLEVEL%% EQU 0 echo.Sucesss in performing the psexec on %%a on %%date%% %%time%% ^>^>"SimpleUpdateLogs/SimpleupdateSuccesslogfile - %%date:/=-%%.txt" >>C:\Temp\%%a.cmd
Status
Not open for further replies.
1 - 1 of 1 Posts
1 - 1 of 1 Posts
Status
Not open for further replies.
Top