Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi Guys
Here is some VBS script which opens the shell to shut down windows, hibernate or put it to sleep etc. - can you tell me how I can select sleep in the drop down menu through the vbs code - I assume it has to be something I add to the objShell.Note I have put a comment in front of WshShell.SendKeys "{Enter} to stop the computer shutting down which is the default value in the shell
Here is the VBS Code:
Dim objShell
Set objShell = CreateObject("Shell.Application")
objShell.ShutdownWindows
set objShell = nothing
Set WshShell = CreateObject("WScript.Shell")
'WshShell.SendKeys "{Enter}"
Set WshShell = NothingThanks
Darril

![]() |
Explorer not responding
|
cannot access
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |