Windows好用的定時休眠指令

Sysinternal 是個品牌

他似乎是做了很多window相關的軟體後來被微軟買下

在微軟網站它提供了相當多好用的工具

以後會慢慢介紹吧...

因為昨天想利用定時關機,但是我希望能夠使用休眠功能

如果知道微軟內建關機功能的朋友,應該知道 shutdown 這個指令

你平常在 win command 下,可以利用 shutdown -s 可以馬上關機...

shutdown -s -t xxx , xxx就是秒數,你可以設定幾秒後自己關機...

shutdown -a 可以放棄剛剛設定的關機時間...

簡潔有力,可是畢竟沒有我要的休眠功能阿...

於是想起 Sysinternal 有一套 PsTools

PsTools 包含了許多小功能

其中一項就是 psshutdown

usage:
psshutdown -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t [nn|h:m]] [-v nn] [-e [u|p]:xx:
yy] [-m "message"] [-u Username [-p password]] [-n s] [\\computer[,computer[,...
]|@file]
-a Abort a shutdown (only possible while countdown is in progress)
-c Allow the shutdown to be aborted by the interactive user
-d Suspend the computer
-e Shutdown reason code (available on Windows XP and higher).
Specify 'u' for unplanned and 'p' for planned
shutdown reason codes.
xx is the major reason code (must be less than 256)
yy is the minor reason code (must be less than 65536)
-f Forces running applications to close
-h Hibernate the computer
-k Poweroff the computer (reboot if poweroff is not supported)
-l Lock the computer
-m Message to display to logged on users
-n Specifies timeout in seconds connecting to remote computers
-o Logoff the console user
-p Specifies optional password for user name. If you omit this
you will be prompted to enter a hidden password.
-r Reboot after shutdown
-s Shutdown without poweroff
-t Specifies countdown in seconds until shutdown (default is 20) or
the time of shutdown (in 24 hour notation)
-u Specifies optional user name for login to remote
computer.
-v Display message for the specified number of seconds before
the shutdown. If you omit this parameter the shutdown
notification dialog displays and specifying a value of 0
omits the dialog.
computer Shutdown the computer or computers specified
@file Shutdown the computers listed in the file specified


由上可以查到

psshutdown -h -t xxxx ,

-h 就是休眠 , -t 當然就是秒數

就可以很方便的使用了...

唯一缺點是,他是command 模式的...對於不善文字介面的人可能就比較失望了..

其他還有很多功能可以看說明文件自己試著用看看..

1 ) 個留言 (歡迎按此留下你的留言喔 ):

sdsfd 提到...
作者已經移除這則留言。

張貼留言