一、运用到的工具
Rebooter 1.3 build 1004, PassMark [20131003][]
Sleeper 2.3 Build 1009, PassMark [20121018][]
二、代码
1.提前配置sleeper,rebooter.
2.S3S4 and reboot(administrators).bat
::%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
::Sleeper 2.3 Build 1009, PassMark [20121018][],Rebooter 1.3 build 1004, PassMark [20131003][] unrar to desktop
::sleeper parameter setting:
::-S[xxxx]
::Sleep State:
::Tells Sleeper to test sleep states 1, 2, 3, or 4. Each x should be a 1 if you want to test a sleep state or a 0 if you don抰 want to test it, eg to test sleep
::states 1 and 4 use 朣1001. If this option is specified, then the 朌 option must also be present (see below).
::
::-D [seconds]
::Cycle mode interval:
::Specifies the amount of time in seconds that Sleeper waits after waking from one state until transition to the next.
::
::-R [seconds]
::Sleep Duration:
::Indicates the length of time in seconds to sleep for. If this option is specified, a valid sleep state must also be present.
::
::-N [number]
::Number of Cycles:
::The number of times to suspend and resume, the default is forever.
::
::Example ?Cycle through supported states
::sleeper -S0011 -R 60 -D 30 -N 1
::Will result in the following behaviour on a system supporting S3 and S4?
::S1 for 60 seconds,
::Wait for a 30 second interval
::S3 for 60 seconds,
::Wait for a 30 second interval
::S4 for 60 seconds
::%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
::Rebooter 1.3 build 1004, PassMark [20131003][] unrar to desktop
::rebooter.exe -reboot
::rebooter need the interface configuration
::%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@echo off
color 0A
echo S3/S4 and Reboot runin test
echo config finish ,confirmation start?
pause
del /q %USERPROFILE%\Desktop\"Sleeper 2.3 Build 1009, PassMark [20121018][]"\sleeper\sleeper\sleeper.log
start /wait %USERPROFILE%\Desktop\"Sleeper 2.3 Build 1009, PassMark [20121018][]"\sleeper\sleeper\sleeper.exe -S0010 -R 30 -D 30 -N 2 -E
echo Sleeper complate!!!
del /q %USERPROFILE%\Documents\PassMark\Rebooter\Rebooter.log
start %USERPROFILE%\Desktop\"Rebooter 1.3 build 1004, PassMark [20131003][]"\rebooter\rebooter.exe -reboot