Jump to content

Change System Time?


Recommended Posts

_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

  • 4 weeks later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...