Shutdown confirmation Tips

 

How to change power button to show “shutdown dialog”, like in windows xp. same as you see when you press alt+f4 on desktop?

Shutdown confirmation with a batch file:


choice /c yn /t 5 /d n /m Shutdown computer?
if ERRORLEVEL==2 goto noshut
shutdown /s /t 1
:noshut

Copy and paste that into notepad, save it as something like MyShutdown.bat, create a shortcut to it somewhere and use that as your shutdown.

Shutdown confirmation with a script file:


Result = Msgbox (”Are you sure that you want to shut down?”,4,”Confirm Shutdown”)

if (Result = 6) then
Set WshShell = WScript.CreateObject(”WScript.Shell”)
Return = WshShell.Run(”shutdown.exe /f /s /t 30″,1,false)
End If

Wscript.Quit()

Copy and paste that into notepad, save it as something like MyShutdown.vbs, create a shortcut to it somewhere and use that as your shutdown. The “/t 30″ is the countdown, adjust as you see fit.

XML Feeds

Feedback awaiting moderation

This post has 13 feedbacks awaiting moderation...