View Full Version : Very Useful Scripts!!!


Narelle
28th Jan 2007 Sun, 08:06
1) Re-Enable registry edit tool after being locked by some malware or anything :
'Enable Registry Editing'
'This code may be freely distributed/modified
On Error Resume Next
'Prevents errors from values that don't exist
Set WshShell = WScript.CreateObject("WScript.Shell")
'Delete DisableRegistryTools registry values

WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Pol icies\System\DisableRegistryTools"
WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Pol icies\System\DisableRegistryTools"

'display message
Message = "You should have access to Regedit now"

X = MsgBox(Message, vbOKOnly, "Done")
Set WshShell = Nothing
Set fso = Nothing

Copy that code and paste it in notepad and save file as EnableRegisteryEdit.vbs then run it
comes in handy to save the day :thumbsup:

Narelle
28th Jan 2007 Sun, 08:07
2) Enable and disable your homepage change from the effect of some malwares.

So you can set a specific homepage and make it un-changeable whatever happend unless you run the code again

'Enable Disable Homepage Change.vbs
'This code may be freely distributed/modified
Option Explicit
Dim WSHShell, RegKey, ValueA, Result
On Error Resume Next
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Policies\Microsoft\Inte rnet Explorer\Control Panel\"
ValueA = WSHShell.RegRead (regkey & "HomePage")

If ValueA = 0 Then 'Change Homepage is Enabled.
Result = MsgBox("Ability to Change Homepage is currently [Enabled]." & _
vbNewLine & "Would you like to Disable?" & _
vbNewLine & "Will lock and Gray it out." & _
vbNewLine & "May need to Log-off for effect.", 36)
If Result = 6 Then 'clicked yes
WSHShell.RegWrite regkey & "HomePage", 1
End If
Else 'Change Homepage is Disabled
Result = MsgBox("Ability to Change Homepage is currently [Disabled]." & _
vbNewLine & "Would you like to Enable?", 36)
If Result = 6 Then 'clicked yes
WshShell.RegDelete "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage"
'Delete Key cause it don't exist normally
End If
End If

Copy that code and paste it in notepad and save file as EnableDisable Homepagechange.vbs for example and then run it either to Disable homepage change or to re-enable homepage change :thumbsup:

Narelle
28th Jan 2007 Sun, 08:08
Here are the codes just extract and run :thumbsup:

http://www.filefactory.com/file/7a90d8/