โดย ICrazyBoy » พฤหัสฯ. ต.ค. 02, 2008 01:55
ลองทำตามนี้นะครับ
1 Copy โค้ดข้างล่างไปวางใน Notepad แล้วเซฟเป็นไฟล์ *.vbs นะ (ชื่ออะไรก็ได้ แต่นามสกุล vbs เช่น install.vbs)
Option Explicit
Dim WSHShell, n, MyBox, p, t, mustboot, errnum, vers
Dim enab, disab, jobfunc, itemtype
Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Pol icies\System\"
p = p & "DisableRegistryTools"
itemtype = "REG_DWORD"
mustboot = "Restart to take effect the change"
enab = "Enabled"
disab = "Disabled"
jobfunc = "Registry Editor are now "
t = "Confirmation"
Err.Clear
On Error Resume Next
n = WSHShell.RegRead (p)
On Error Goto 0
errnum = Err.Number
if errnum <> 0 then
WSHShell.RegWrite p, 0, itemtype
End If
If n = 0 Then
n = 1
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & disab & vbCR & mustboot, 4096, t)
ElseIf n = 1 then
n = 0
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & enab & vbCR & mustboot, 4096, t)
End If
2 ดับเบิลคลิกไฟล์ที่ได้ รีสตาร์ท
ลองดูนะคร๊าบบบบ...
แก้ไขล่าสุดโดย
ICrazyBoy เมื่อ พฤหัสฯ. ต.ค. 02, 2008 02:07, แก้ไขแล้ว 1 ครั้ง