'Fix Error 1606

Option Explicit

Dim WshShell, p, m, itemtype, sDone
Dim Fso, WinFolder, sInput, sMsg

Set Fso = CreateObject("Scripting.FileSystemObject")
Set WinFolder = Fso.GetSpecialFolder(0)
Set WshShell = WScript.CreateObject("WScript.Shell")
WinFolder = Left(WinFolder, 3)

sMsg = "This script will fix the the 1606 error." & vbCr & vbCr _
 & "If you do not trust the source of this information, do not add it to the registry."  & vbCr  & vbCr _
 & "Would you like to continue?"

sInput = MsgBox(sMsg, vbYesNo + vbInformation, "Paul's XP and Vista Tweaks")
If sInput = vbYes Then 

p = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\"
p = p & "Common Administrative Tools"
itemtype = "REG_SZ"
m = WinFolder & "Documents and Settings\All Users\Start Menu\Programs\Administrative Tools"

WshShell.RegWrite p, m, itemtype

sDone = "Common Administrative Tools have been reset." & vbCr & vbCr _
& "You may need to reboot for this to take effect" & vbCr & vbCr _
& "This script was downloaded from www.paulsxp.com"
MsgBox sDone, 64,  "Finished"
End If


