Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to hibernate using VBScript?

816 views
Skip to first unread message

johngross

unread,
Apr 7, 2010, 5:56:40 PM4/7/10
to
I would very much like to be able to schedule a backup process
immediately before putting my system into hibernation (rather than on
full shutdown, which means it will take longer to boot up).

Having failed to find a backup package that will do this, I am
investigating using a script to do it for me. I have found a VBScript
"command" that was said to do the hibernate function I'm looking for,
as follows:

Set objshell = CreateObject("Wscript.Shell")
objshell.Run "rundll32.exe PowrProf.dll SetSuspend State Hibernate"

but when I run this script, I get an error box titled "RUNDLL" with
the text:

Error in PowrProf.dll
Missing entry:SetSuspendState

and, of course, nothing else happens.

Can anyone help me solve this problem?


johngross

unread,
Apr 8, 2010, 6:31:04 PM4/8/10
to
Checking my previous post, I noticed an error. The second line of code
I quoted should read:

> objshell.Run "rundll32.exe PowrProf.dll SetSuspendState Hibernate"

0 new messages