Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBscript to wake up standby mode

Status
Not open for further replies.

ndisdabest

Programmer
Dec 17, 2004
4
US
Hi --

I am writing a script that will need to detect if a PC is in standby mode and, if it is, wake it up to perform some other jobs. Does anyone know how to do this?
 
Set colMonitoredEvents = GetObject("winmgmts:")._
ExecNotificationQuery("Select * from Win32_PowerManagementEvent WHERE EventType='18'")
Do
Set strLatestEvent = colMonitoredEvents.NextEvent

Loop

if i recall the eventtype 18 is when it comes out of hibernation.
you might want to look at something like Win32_Powermanagement to detect if it is actually in standby. good place to start i would think
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top