'fixnocontrolpanel.vbs - Restores Control Panel after lockout with TweakUI or other utility '© Doug Knox - 10/28/2001 'This code may be freely distributed/modified 'Downloaded from www.dougknox.com Option Explicit On Error Resume Next 'Declare variables Dim WSHShell, MyBox, p1, t Dim jobfunc 'Set the Windows Script Host Shell and assign values to variables Set WSHShell = WScript.CreateObject("WScript.Shell") p1 = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoControlPanel" 'Describe the funtion of the script for a dialog box jobfunc = "Control Panel has now been restored." & vbCR jobfunc = jobfunc & "You may need to log off/log on for the " & vbCR jobfunc = jobfunc & "change to take effect." 'This section writes the correct values to the Registry WSHShell.RegDelete p1 t = "Confirmation" MyBox = MsgBox (jobfunc, 4096, t)