mulletmandan Posted July 2, 2005 Share Posted July 2, 2005 I'm trying to set up a script to change the system date temporarily and then change it back. Here's what I've got: $currentdate=@Mon & "/" & @MDay & "/" & @Year MsgBox(4096,"Notify", $currentdate) Run(@ComSpec & " /c " & 'date 11/11/2003', "", @SW_HIDE) MsgBox(4096,"Notify", "Date Changed") Run(@ComSpec & " /c " & 'date $currentdate', "", @SW_HIDE) MsgBox(4096,"Notify", "Date Changed Back") Exit The date will change, but won't change back. I am guessing this has something to do with my variable in Line 5. Any help would be nice. Thanks! Link to comment Share on other sites More sharing options...
w0uter Posted July 2, 2005 Share Posted July 2, 2005 (edited) try: Run(@ComSpec & " /c " & 'date ' & $currentdate, "", @SW_HIDE) also IMO it would be better if you use runwait. Edited July 2, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
mulletmandan Posted July 3, 2005 Author Share Posted July 3, 2005 try:Run(@ComSpec & " /c " & 'date ' & $currentdate, "", @SW_HIDE)also IMO it would be better if you use runwait.<{POST_SNAPBACK}>Sorry, I'm a bit new at this. Could you rewrite that script for me using runwait so I can see its usage?Thanks! Link to comment Share on other sites More sharing options...
GaryFrost Posted July 3, 2005 Share Posted July 3, 2005 RunWait(@ComSpec & " /c " & 'date ' & $currentdate, "", @SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now