Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Sun Jan 04, 2009 1:38 am
1. download PsTools v2.44 from
http://technet.microsoft.com/en-us/sysi ... 96649.aspx.
2. decompress and move it in C:\Program Files\SysInternals\PsTools\
3. copy the following script:
Code: Select all
Let>RP_WINDOWMODE=0
Run>powercfg /hibernate on
Run>C:\Program Files\SysInternals\PsTools\psshutdown.exe -h -t 00
4. create a Desktop Shortcut.
Daily Operation
Just click the above-mentioned shortcut and your computer will enter hibernation mode in no time. The script should save us enormous time in our daily Windows booting up and shutdown.
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Jan 05, 2009 1:06 pm
This works for me:
Run>shutdown.exe /h
No need to download anything.
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Mon Jan 05, 2009 1:48 pm
mtettmar wrote:
Run>shutdown.exe /h
Thanks Marcus. Your code didn't work on my Dell Dimension 8400/Windows XP SP3. And I test again now and still it won't initiate Windows hibernation.
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Mon Jan 05, 2009 5:48 pm
No /h available on my XP PRO SP2:
C:\Documents and Settings\Bob>shutdown.exe /?
Usage: shutdown.exe [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]
No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
-
Me_again
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Post
by Me_again » Mon Jan 05, 2009 9:11 pm
I saw the same thing Bob.
It's worth to note that on many, but maybe not all, PC's the function of the power button is defined in Control Panel, Power Options. If hibernation is enabled (on the Hibernate tab), then under the Advanced tab the power button can be set to hibernate the PC.
Just my 2 cents worth but personally I don't have a very high regard for XP hibernation. Seems to me that the PC doesn't quite come back 100% after it has hibernated, especially in the networking area and sooner or later a full restart is needed.
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Mon Jan 05, 2009 10:24 pm
Bob,
That's exactly why I googled around to search for the hibernation solution.
Me_again,
I understand your concern. In my case, it's huge time saver. Without hibernation, my computer takes about 3 minutes to complete the Windows startup, loading MindManager, Outlook, ....etc. So far I haven't encountered any issue with hibernation.
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Mon Jan 05, 2009 11:40 pm
I agree with me_again, the first thing I do to a new computer is turn off all the power options. (Laptops are an exception.)
That said. If hibernate is enabled. This script works for me on my WinXP SP3 computer.
Code: Select all
Press lwinkey
Release lwinkey
Wait>0.5
Send>u
Wait>0.5
Send>s
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Mon Jan 05, 2009 11:50 pm
I usually disable hibernate on all systems, laptops included, and delete the hibernate file. Mine was disabled. I did enable it to see if any change, but the command still showed no option for /h, even when hibernate was enabled. Disabled it again.....
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Tue Jan 06, 2009 3:39 am
JRL,
1. Your script may fail if you have installed Ultra Recall, Ultra Edit,.... etc.
2. In case you're interested, the following script will initiate Windows hibernation:
Press lwinkey
Release lwinkey
Wait>0.5
Send>u
Wait>0.5
Press Shift
Send>h
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Tue Jan 06, 2009 4:53 am
JRL,
1. Your script may fail if you have installed Ultra Recall, Ultra Edit,.... etc.
2. In case you're interested, the following script will initiate Windows hibernation:
Press lwinkey
Release lwinkey
Wait>0.5
Send>u
Wait>0.5
Press Shift
Send>h
Armstrong,
My computer doesn't seem to need the press shift line. Also, probably because I always turn this stuff off so I've never dealt with it, I didn't realize there was a difference between "hibernate" and "Standby". I've seen many computers that I've "fixed" simply by unchecking all of the power save options. Therefore I routinely turn them off when I set up a new computer. Now that I've played with them a little, I kind of like StandBy. Too bad I'm convinced it will eventually create problems.
-
Me_again
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Post
by Me_again » Tue Jan 06, 2009 2:29 pm
If have a "U" start menu item (I have UltraEdit, good guess armsys) then I think this should work reliably:
Press lwinkey
Release lwinkey
Wait>0.5
Press Up
Wait>0.5
Press Enter
Wait>0.5
Send>r
Wait>0.5
Press Enter
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Tue Jan 06, 2009 10:09 pm
For armsys:
Thanks for the link. But I was reporting on status of /h for WinXP SP-2. But the link is still useful for me.
Good to see you back in the neighborhood again.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Tue May 12, 2009 2:53 pm
5 months later......
Ran across
THIS this morning.
The following works for me in XP sp3. From the Micosoft documentation, I assume it will work with Win 2000 or greater.
Code: Select all
LibFunc>PowrProf.dll,SetSuspendState,SSSres,1,0,0
Bob wrote:I usually disable hibernate on all systems
If Hibernate is disabled the above will put the computer in StandBy.
-
adroege
- Automation Wizard
- Posts: 438
- Joined: Tue Dec 07, 2004 7:39 pm
Post
by adroege » Fri Jun 03, 2011 2:01 pm
How can I speed up Windows Vista resume from hibernate?
Use standby instead of hibernate. The only difference is a small amount of power is used to keep RAM alive while in standby, cpu,hard drive, etc are still powered down (like hibernate).