larcerkev Posted February 1, 2011 Share Posted February 1, 2011 I've tried to use a command such as _RunDOS('time 17:15:00.00') But it give me an error, how would I be able to change the time to something new? Link to comment Share on other sites More sharing options...
trancexx Posted February 1, 2011 Share Posted February 1, 2011 To time not seen before? Error you got indicates the solution. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
larcerkev Posted February 1, 2011 Author Share Posted February 1, 2011 To time not seen before?Error you got indicates the solution.Sorry I should have put it in there.ERROR: _RunDOS(): undefined function._RunDOS('time 17:15:00.00') Link to comment Share on other sites More sharing options...
trancexx Posted February 1, 2011 Share Posted February 1, 2011 _RunDOS is not built-in function, it's defined in file called Process.au3. To be able to use it you have to "include" that file to your script. #include <Process.au3> _RunDOS('time 17:15:00.00') Still, very likely time wouldn't change, this time not because of syntax error but one of semantic nature. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 2, 2011 Share Posted February 2, 2011 Something to think about: #include <Process.au3> #RequireAdmin $NewTime = '17:15:00.00' _RunDOS('echo ' & $NewTime & '>> %temp%\tmp.tmp&&time<%temp%\tmp.tmp&&del %temp%\tmp.tmp') Link to comment Share on other sites More sharing options...
larcerkev Posted February 2, 2011 Author Share Posted February 2, 2011 Adding the #include solved the problem, I feel kind of stupid for overlooking that. Link to comment Share on other sites More sharing options...
LeTanc Posted February 25, 2011 Share Posted February 25, 2011 Something to think about: #include <Process.au3> #RequireAdmin $NewTime = '17:15:00.00' _RunDOS('echo ' & $NewTime & '>> %temp%\tmp.tmp&&time<%temp%\tmp.tmp&&del %temp%\tmp.tmp') JoHanatCent, Can you tell me what the temp line does? I believe it redirects the output to a temporary file and then deletes it, but I don't know it's purpose. Also, what does the middle "&&time<%temp%\tmp.tmp&&" portion of it do? Link to comment Share on other sites More sharing options...
LeTanc Posted February 25, 2011 Share Posted February 25, 2011 JoHanatCent,Can you tell me what the temp line does? I believe it redirects the output to a temporary file and then deletes it, but I don't know it's purpose. Also, what does the middle "&&time<%temp%\tmp.tmp&&" portion of it do?I think I figured it out myself!! It outputs the time to a temporary file, calls the time command with the input being that time, then deletes the file Does that get around not having admin rights? Link to comment Share on other sites More sharing options...
JoHanatCent Posted February 25, 2011 Share Posted February 25, 2011 In Vista you need the #RequireAdmin else it will ignore you! 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