'tsfileassoc.vbs 'tested on Windows 2000 Terminal Server ' NOTE: you may need to log off and back on to initialize the change Set Sh = CreateObject("WScript.Shell") TsFileAssocKey = _ "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\" _ & "Policies\Explorer\NoFileAssociate" 'word:00000000 On Error Resume Next CurrentSetting = Sh.RegRead(TsFileAssocKey) If Err.Number<>0 Then MsgBox "The file associations setting does not exist." WScript.Quit End If On Error Goto 0 NewSetting = CInt(TRUE XOR CBool(CurrentSetting)) rtn = MsgBox("File associations can be customized: " _ & CBool(CurrentSetting) & vbCrLf _ & "Do you wish to change this setting?", 4) If rtn = vbYes Then Sh.RegWrite TsFileAssocKey, NewSetting MsgBox "File associations can be customized: " _ & CBool(NewSetting) & vbCrLf _ & "log on again for the new settings to take effect." WScript.Quit End if MsgBox "No changes to file associations made."