Frag Infinity Tournament, Inc. - FITES LAN Party - www.fites.net
LAN Party Forums => Support Group => Started by: decepticon on October 13, 2009, 07:42:43 AM
-
Does anyone know of a script or who can direct me to the info needed to make one that will change the Windows date back to one I specify when a specific program runs and then change it back to the normal date once the program exits?
-
Depending on the program you are running you might be able to do it in a simple batch script.
date 10-03-2009
c:\program files\notepad.exe
date 10-13-2009
The batch script won't wait for every program to finish before executing the next statement. That is why it won't work for any program. Try it and see.
-
That worked, but I really need it to wait until the program exits and then change the date back to the current date. I would have used a bat file, but I was under the impression that changing the date in a cmd window would not change the date for windows. Now that I know that it works I will investigate the 'waiting' for a program to exit in a batch file.
-
Eureka!!!!
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET Today=%%B
date 6-03-2009
start /wait spw.exe
date %Today%
-
DOS. Still the most useful part of Windows.
-
It's not DOS, it's a CLI.
-
It's not DOS, it's a CLI.
QFT!
Batch Scripts, VBScript, and PowerShell....every SysAdmin's three best friends. I really need to add PowerShell to my cache of "friends" but haven't gotten around to making introductions yet ;)