Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim ObjShell
- Set ObjShell = CreateObject("WScript.Shell")
- Dim Input, Hours, Command
- Input = InputBox("Enter hours until shutdown", "Info", "1")
- If Len(Input) > 0 And IsNumeric(Input) Then
- Hours = Input * 3600
- Command = "C:\WINDOWS\system32\shutdown.exe /s /f /t " + CStr(Hours)
- ObjShell.Run Command
- ElseIf Not(IsNumeric(Input)) Then
- MsgBox "Input must be a number", vbInformation, "Error"
- End If
Add Comment
Please, Sign In to add comment