Forum Discussion
chrisb
11 years agoRegular Contributor
You can set your current system date and time by syncing with a server, for example:
sys.OleObject("WScript.Shell").Exec("net time \\<your server name here> /set /yes")
This script runs the net time command in the Windows shell. For more details see here: http://msdn.microsoft.com/en-us/library/ateytk4a(v=vs.84).aspx
And for info on OLEObject see here: http://support.smartbear.com/viewarticle/56929/
sys.OleObject("WScript.Shell").Exec("net time \\<your server name here> /set /yes")
This script runs the net time command in the Windows shell. For more details see here: http://msdn.microsoft.com/en-us/library/ateytk4a(v=vs.84).aspx
And for info on OLEObject see here: http://support.smartbear.com/viewarticle/56929/