Log in
BSU INFO-TECH
FB COMMENT
simple Visual Basic Script to Re enable Registry Editing
:: Open Forum :: I.T. Tips
Page 1 of 1
simple Visual Basic Script to Re enable Registry Editing
A simple Visual Basic Script to Re enable Registry Editing after a trojan/worm had broken into your system. Just double click it and it will enable regeditor again. To disable, double click it again. Parang On and Off switch lang sya.
Here is the script. just copy and paste on a notepad then save as .vbs
'Enable/Disable Registry Editing tools
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")
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
Here is the script. just copy and paste on a notepad then save as .vbs
'Enable/Disable Registry Editing tools
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")
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
:: Open Forum :: I.T. Tips
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Fri 25 Jan 2013, 12:12 pm by remase
» VB.net+mysql connection string
Wed 11 Apr 2012, 12:51 pm by markjeggar
» pa visit nmn
Tue 03 Jan 2012, 1:37 am by Generym
» How to de-active your account here?
Tue 27 Dec 2011, 1:57 am by Generym
» Team Building
Sat 26 Nov 2011, 5:31 am by kate
» Check attendance: name and batch, currently working at?
Fri 09 Sep 2011, 4:35 am by kuratcha
» I wonder!!!
Fri 01 Jul 2011, 2:08 am by Generym
» happy experience
Sun 01 May 2011, 10:07 pm by i337
» how smart is your smart phone?
Sun 01 May 2011, 9:56 pm by i337