mikejp56 0 Posted July 4, 2013 I would like to be able to set what time a Windows PC will automatically shut down. Does anyone have a script for this? Thanks. Mike Share this post Link to post Share on other sites
water 2,365 Posted July 4, 2013 You posted in the wrong forum! Have a look at function Shutdown. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
mikejp56 0 Posted July 4, 2013 Hi water, Thanks for the tip, and sorry for posting in the wrong forum. Mike Share this post Link to post Share on other sites
scubar 1 Posted July 4, 2013 Heres a quick basic version you can edit. While 1 $Time = @Hour & @MIN If $Time = "2335" Then Shutdown(5) ExitLoop Else Sleep(30000) EndIf WEnd Share this post Link to post Share on other sites
Kurto2021 0 Posted July 5, 2013 couldn't you just write a batch file and use windows to schedule it? Share this post Link to post Share on other sites
TheSaint 2,457 Posted July 5, 2013 Yes he could, by using a command like I use with a Desktop shortcut, that doesn't require AutoIt at all. C:WindowsSystem32shutdown.exe /s /f /t 9 That's on Win 7, and you may even be able to do away with the Batch file (don't know, haven't used Schedule for many a year)? Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Share this post Link to post Share on other sites