igana Posted January 31, 2021 Share Posted January 31, 2021 Hi guys, I'm trying to create a shutdown application and it will automatically shutdown the pc after working hours. But if the user is still working overtime, they will be able to cancel it. Is it possible to have only the cancel button on the message box? Please see below script for reference. $x = MsgBox(17+256+4096,"Shutdown","In accordance with company power saving policies, your computer will be shutdown in 1 minute." & @CRLF & @CRLF & "If you wish to abort this process, click the Cancel button below.",60) If $x = -1 Then ; Code 13 = 1 (shutdown) + 4 (force) + 8 (power down) Shutdown(13) Else MsgBox(0,"Shutdown Aborted","Please remember to power off your computer when you are done.") EndIf Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now