PDA

View Full Version : Tắt máy theo thời gian định trước:


Maika
03-21-2007, 07:51 PM
Các thao tác dưới đây tác động lên Registry nên các bạn nên sao lưu trước khi làm.

Tắt máy theo thời gian định trước: (hiển thị khi click phải vào My Computer)
-Bạn mở Notepad lên.
-Đây là đoạn code chung, bạn copy cái này rồi dán vào notepad trước:
Windows Registry Editor Version 5.00
-Copy đoạn code tương ứng với thời gian bạn muốn máy tắt (chép hết cũng được, nhưng sẽ làm cho menu chuột phải dài ngoằn ):

10 phút

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell1...Shutdown In ...10 Min]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell1...Shutdown In ...10 Min\command]
@="shutdown -s -f -t 600"

20 phút

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell2...Shutdown In ...20 Min]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell2...Shutdown In ...20 Min\command]
@="shutdown -s -f -t 1200"

30 phút

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell3...Shutdown In ...30 Min]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell3...Shutdown In ...30 Min\command]
@="shutdown -s -f -t 1800"

40 phút

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell4...Shutdown In ...40 Min]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell4...Shutdown In ...40 Min\command]
@="shutdown -s -f -t 2400"

50 phút

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell5...Shutdown In ...50 Min]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell5...Shutdown In ...50 Min\command]
@="shutdown -s -f -t 3000"

60 phút

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell6...Shutdown In ...60 Min]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell6...Shutdown In ...60 Min\command]
@="shutdown -s -f -t 3600"

2 tiếng

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell7...Shutdown In ....2 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell7...Shutdown In ....2 hrs\command]
@="shutdown -s -f -t 7200"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell8...Shutdown In ....3 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell8...Shutdown In ....3 hrs\command]
@="shutdown -s -f -t 10800"

4 tiếng

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell9...Shutdown In ....4 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell9...Shutdown In ....4 hrs\command]
@="shutdown -s -f -t 14400"

5 tiếng

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\10...Shutdown In ....5 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\10...Shutdown In ....5 hrs\command]
@="shutdown -s -f -t 18000"

6 tiếng

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\11...Shutdown In ....6 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\11...Shutdown In ....6 hrs\command]
@="shutdown -s -f -t 21600"


12 tiếng

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\12...Shutdown In ...12 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\12...Shutdown In ...12 hrs\command]
@="shutdown -s -f -t 43200"

24 tiếng

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\13...Shutdown In ...24 hrs]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\13...Shutdown In ...24 hrs\command]
@="shutdown -s -f -t 86400"

-Save lại với tên tatmay.reg (hoặc tên gì tùy bạn)

Thêm Device Manager vào menu chuột phải: (hiển thị khi click phải vào My Computer)
Bạn save file dưới đây về rồi đổi tên lại thành .reg

Down (http://www.fileden.com/files/2007/2/27/827871/dvcmgr.txt)


S.T

nhatphuc
04-18-2007, 12:33 AM
cần gì mà phải phức tạp thế chứ. khi nào muốn shutdown thì vào

C:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-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 war
ning
-d [u][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 le
ss than 256)
yy is the minor reason code (positive integer le
ss than 65536)


thấy ngay muốn shutdown với thời gian cho trước chỉ việc đánh
shutdown -s -t xx với xx là số giây sau đó máy tắt là được mà