ကၽြန္ေတာ္တုိ႕ အေၾကာင္း တစ္စုံတရာ ေပၚလုိ႕ မိမိ ကြန္ပ်ဴတာကုိ Restart ေပးတဲ႕အခါမ်ဳိးေတြမွာ မိမိစက္ရဲ႕ Restart Time ဘယ္ေလာက္ၾကာျမင္႕ လဲဆုိတာကုိ ၾကည္႕တဲ႕နည္းေလးျဖစ္ပါတယ္။လုပ္ရတာလဲ လြယ္ကူပါတယ္။
1. Start >> Run Command >> notepad လုိ႕ရုိက္ျပီ Enter ေခါက္လုိက္ပါ။ ( Accessories ကေနလဲ ေခၚလုိ႕ရပါတယ္) ေအာက္မွာ တင္ျပထားတဲ႕ code ေတြကုိ copy ကူးျပီထည္႕လုိက္ပါ။ Restart-Time.vbs လုိ႕ Desktop ေပၚမွာ Save လုိက္ပါ။
Option Explicit
On Error Resume Next
Dim Wsh, Time1, Time2, Result, PathFile, MsgResult, MsgA, AppName, KeyA, KeyB, TimeDiff
MsgA = "Please close all running applications and click on OK."
KeyA = "HKEY_CURRENT_USER\Software\RestartTime\"
KeyB = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\RestartTime"
AppName = "Restart-Time"
Set Wsh = CreateObject("WScript.Shell")
PathFile = """" & WScript.ScriptFullName & """"
Result = wsh.RegRead(KeyA & "Times")
if Result = "" then
MsgResult = Msgbox (MsgA, vbOKCancel, AppName)
If MsgResult = vbcancel then WScript.Quit
Wsh.RegWrite KeyA & "Times", left(Time,8), "REG_SZ"
Wsh.RegWrite KeyB, PathFile, "REG_SZ"
Wsh.Run "cmd /c Shutdown -r -t 00", false, 0
else
Wsh.RegDelete KeyA & "Times"
Wsh.RegDelete KeyA
Wsh.RegDelete KeyB
TimeDiff = DateDiff("s",Result,left(Time,8))
MsgBox "Your computer restarts in " & TimeDiff & " seconds", VbInformation, AppName
end if
wscript.Quit
2. ျပီရင္ Desktop ေပၚမွာ မိမိတည္ေဆာက္ခဲ႕တဲ႕ Restart-Time.vbs Icon ကုိ Run လုိက္ပါ။ ေအာက္ပါအတုိင္း မိမိဖြင္႕ထားတဲ႕ Application ေတြကုိ ပိတ္ခုိင္းပါလိမ္႔မယ္။
3. OK ကုိႏုိပ္လုိက္ရင္ Restart က်မည္႕ၾကာခ်ိန္ကုိေတြ႕ရမွာျဖစ္ပါတယ္။
Wednesday, November 11, 2009
Windows 7 မွာ Restart Time ၾကည္႕နည္း
11:57 AM
firststep
No comments
0 comments:
Post a Comment