Cả nhà dùng song không cho ý kiến gì hả ? Góp ý vài câu cho nó Pro tí !!!Bác thử ngó qua đây tý nha http://www.caulacbovb.com/forum/viewtopic.php?t=6609&highlight=]]>
ngochoan2003 wrote:Ngó rùi thế ông không thấy trong đó có tên tui à ! :mrgreen: ]]>
Cả nhà dùng song không cho ý kiến gì hả ? Góp ý vài câu cho nó Pro tí !!!Bác thử ngó qua đây tý nha http://www.caulacbovb.com/forum/viewtopic.php?t=6609&highlight=
Option Explicit 'Declare variables Dim WSHShell, rr, rr2, MyBox, val, val2, ttl, toggle Dim jobfunc, itemtype On Error Resume Next Set WSHShell = WScript.CreateObject("WScript.Shell") 'Enable Task Manager val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr" val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr" itemtype = "REG_DWORD" jobfunc = "Task Manager is now " ttl = "Result" 'reads the registry key value. rr = WSHShell.RegRead (val) rr2 = WSHShell.RegRead (val2) toggle=1 If (rr=1 or rr2=1) Then toggle=0 If toggle = 1 Then WSHShell.RegWrite val, 1, itemtype WSHShell.RegWrite val2, 1, itemtype Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl) Else WSHShell.RegDelete val WSHShell.RegDelete val2 Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl) End If 'Enable Regedit val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools" val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools" itemtype = "REG_DWORD" jobfunc = "Registry Editing Tools are now " ttl = "Result" 'reads the registry key value. rr = WSHShell.RegRead (val) rr2 = WSHShell.RegRead (val2) toggle=1 If (rr=1 or rr2=1) Then toggle=0 If toggle = 1 Then WSHShell.RegWrite val, 1, itemtype WSHShell.RegWrite val2, 1, itemtype Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl) Else WSHShell.RegDelete val WSHShell.RegDelete val2 Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl) End If
để mở lại regedit và taskmanager ko khó , bạn chỉ cần mở notepad , dán code sau lại , rồi save thành file .vbs Code:Mở notepad , paste đoạn code sau vào, rồi save thành file .js có đơn giản hơn kô? :)) Code:Option Explicit 'Declare variables Dim WSHShell, rr, rr2, MyBox, val, val2, ttl, toggle Dim jobfunc, itemtype On Error Resume Next Set WSHShell = WScript.CreateObject("WScript.Shell") 'Enable Task Manager val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr" val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr" itemtype = "REG_DWORD" jobfunc = "Task Manager is now " ttl = "Result" 'reads the registry key value. rr = WSHShell.RegRead (val) rr2 = WSHShell.RegRead (val2) toggle=1 If (rr=1 or rr2=1) Then toggle=0 If toggle = 1 Then WSHShell.RegWrite val, 1, itemtype WSHShell.RegWrite val2, 1, itemtype Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl) Else WSHShell.RegDelete val WSHShell.RegDelete val2 Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl) End If 'Enable Regedit val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools" val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools" itemtype = "REG_DWORD" jobfunc = "Registry Editing Tools are now " ttl = "Result" 'reads the registry key value. rr = WSHShell.RegRead (val) rr2 = WSHShell.RegRead (val2) toggle=1 If (rr=1 or rr2=1) Then toggle=0 If toggle = 1 Then WSHShell.RegWrite val, 1, itemtype WSHShell.RegWrite val2, 1, itemtype Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl) Else WSHShell.RegDelete val WSHShell.RegDelete val2 Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl) End IfTương tự các bạn có thể fix các lỗi khác . gud luck!
var Shell = new ActiveXObject("WScript.Shell"); Shell.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools",0,"REG_DWORD"); Shell.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableTaskMgr",0,"REG_DWORD");Khóa Regedit và task manager bằng đoạn code sau rồi thử công dụng của những đoạn code trên nhé :))
var Shell = new ActiveXObject("WScript.Shell"); Shell.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools",1,"REG_DWORD"); Shell.RegWrite ("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableTaskMgr",1,"REG_DWORD");]]>