Anyway, I have determined the best solution is to write a little batch script I can click to run right before I leave and let it run over night to abort any shutdown commands they may send it. However, I am having an issue with the looping part. I need the code to run from when I click (usually some time between 1430 and 1600) it till around 0700 the next day. My problem is, it doesn't seem to be looping. For testing purposes, I did try setting currentdate to yesterday and changed the time in the second if statement to 1 minute after system time since it is past 0700 here.
set currentdate=%DATE% :loop shutdown -a if %DATE% == %currentdate% && %TIME% geq 14:00:00.00 ( goto loop ) else ( if not %DATE% == %currentdate% && %TIME% leq 07:00:00.00 ( goto loop ) )

New Topic/Question
Reply




MultiQuote





|