tommy13061980 Posted May 31, 2010 Share Posted May 31, 2010 Hello, I am quitte new with AutoIt. One thing i just can not solve. My program needs to set the windows clock to a specific time. Example: Script -> Change windows clock to 07:30 I found this: _Date_Time_SetTimeZoneInformation But it is a little bit difficult for me to understand. I only need to change the visible clock time in the bottom left corner. Any help will be appreciated very much. Many thanks in advance Link to comment Share on other sites More sharing options...
water Posted May 31, 2010 Share Posted May 31, 2010 (edited) To set the current local time of your PC use: _Date_Time_SetLocalTime(). In the help file you'll find an example. Edited May 31, 2010 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tommy13061980 Posted May 31, 2010 Author Share Posted May 31, 2010 Thank you very much Mass Spammer. And also for so fast answering. It seems to work perfect on XP. I still need to test on VISTA. Link to comment Share on other sites More sharing options...
Fire Posted May 31, 2010 Share Posted May 31, 2010 Hi. Another way for change windows time : NOTE: You need administrative privilegies for this operation. #RequireAdmin RunWait("cmd.exe /c " & "time 07:30",@ScriptDir,@SW_HIDE) [size="5"] [/size] Link to comment Share on other sites More sharing options...
tommy13061980 Posted May 31, 2010 Author Share Posted May 31, 2010 Hi, Thanx both of you. But, as i espected, VISTA sais, can not change windows time. User has not the right privileges. is thwere any way i can get arround that. Another option is to change the creation date of a file. But the file has a crc check. Link to comment Share on other sites More sharing options...
water Posted May 31, 2010 Share Posted May 31, 2010 The help file says: "Function _Date_Time_SetLocalTimeThe SetLocalTime function enables the SE_SYSTEMTIME_NAME privilege before changing the local time." If you don't have this privilege then there is no way to change the time. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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