'Uninstall TweakUI v1.33 'xp_tweakui_uninstall.vbs '© Doug Knox - rev 04/25/2002 'Downloaded from www.dougknox.com Option Explicit On Error Resume Next 'Dimension variables Dim WSHShell, rcmd, winver, regkey1, errnum, xyz, errmsg Dim fso, msg, WinDir, X Set fso = CreateObject("Scripting.FileSystemObject") 'Set the Windows Script Host Shell and assign values to variables Set WSHShell = WScript.CreateObject("WScript.Shell") WinDir = fso.GetSpecialFolder(0) & "\INF\TweakUI.Inf" If (fso.FileExists(WinDir)) Then Call Remove() Else errmsg = "TWEAKUI.INF does not exist! Script cannot continue!" & vbCR & vbCR errmsg = errmsg & "Would you like manual removal instructions?" X = MsgBox(errmsg,4,"Error!") If X = 7 Then Set WshShell = Nothing Set fso = Nothing WScript.Quit Else WshShell.Run("iexplore.exe http://www.dougknox.com/xp/tips/xp_tweak133_remove.htm") End If End If Public Sub Remove() 'Assign variables regkey1 = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\CurrentVersion" Err.Clear winver = WshShell.RegRead(regkey1) errnum = Err.Number If errnum = 0 Then If Left(winver,3) = "5.1" Then rcmd = "%windir%\system32\rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 4 %windir%\Inf\Tweakui.Inf" WshShell.Run(rcmd) WshShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\Tweak UI" MsgBox "TweakUI has been uninstalled.",4096,"Finished!" Else xyz = 1 End If Else xyz = 1 End If If xyz = 1 Then MsgBox "This script only runs on Windows XP!",4096,"Error!" End If End Sub