Problem: TIFF association after Office 2003 SP3

With SP3 of Microsoft Office 2003 we loosed TIFF association for all clients.
Microsoft Customer support relese a script for manage this BIG problem.

' Name: MODI File Association Fix
' Author: Microsoft Customer Support Services
' Copyright (c) 2008, Microsoft Corporation
' Script to re-associate .TIF, .TIFF, and .MDI files back to MODI
' Writes associations to the HKCU hive to prevent future Office 2003 patch or repair actions from removing them

Option Explicit
Dim WshShell
Dim bTIF, bTIFF, bMDI

'=======================================================================================================
'Section for script behavior customizations

'Associate .TIF with MODI.
' Set this option to 'False' to prevent .TIF from being re-associated
bTIF = True

'Associate .TIFF with MODI.
' Set this option to 'False' to prevent .TIFF from being re-associated
bTIFF = True

'Associate .MDI with MODI.
' Set this option to 'False' to prevent .MDI from being re-associated
bMDI = True

'DO NOT CUSTOMIZE BELOW THIS LINE!
'==================================================================================

'Create instance of shell object
Set WshShell = WScript.CreateObject("WScript.Shell") 

Const sPrefix1 = "HKCU\SOFTWARE\Classes\"
Const sPrefix2 = "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"
Const sGUID = "{58F2E3BB-72BD-46DF-B134-1B50628668FB}"

if bTIF = True then
	' Write registry values for .TIF association
	WshShell.RegWrite sPrefix1 & ".tif\","TIFImage.Document","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tif\Content Type","image/tif","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tif\PerceivedType","image","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tif\OpenWithList\mspview.exe\","","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tif\OpenWithProgids\TIFImage.Document","","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tif\PersistentHandler\",sGUID,"REG_SZ"
	WshShell.RegWrite sPrefix2 & ".tif\Progid","MSPaper.Document","REG_SZ"
	WshShell.RegWrite sPrefix2 & ".tif\OpenWithList\a","MSPVIEW.EXE","REG_SZ"
	WshShell.RegWrite sPrefix2 & ".tif\OpenWithProgids\TIFImage.Document",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".tif\OpenWithProgids\MSPaper.Document",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".tif\OpenWithProgids\Imaging.Document",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".tif\UserChoice\Progid","MSPaper.Document","REG_SZ"
end if

if bTIFF = True then
	' write registry values for .TIFF association
	WshShell.RegWrite sPrefix1 & ".tiff\","TIFImage.Document","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tiff\Content Type","image/tiff","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tiff\PerceivedType","image","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tiff\OpenWithList\mspview.exe\","","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tiff\OpenWithProgids\TIFImage.Document","","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".tiff\PersistentHandler\",sGUID,"REG_SZ"
	WshShell.RegWrite sPrefix2 & ".tiff\Progid","MSPaper.Document","REG_SZ"
	WshShell.RegWrite sPrefix2 & ".tiff\OpenWithList\a","MSPVIEW.EXE","REG_SZ"
	WshShell.RegWrite sPrefix2 & ".tiff\OpenWithProgids\TIFImage.Document",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".tiff\OpenWithProgids\MSPaper.Document",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".tiff\OpenWithProgids\Imaging.Document",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".tiff\UserChoice\Progid","MSPaper.Document","REG_SZ"
end if

if bMDI = True then
	' write registry values for .MDI association
	WshShell.RegWrite sPrefix1 & ".mdi\","mdi_auto_file","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".mdi\Content Type","image/vnd.ms-modi","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".mdi\MSPaper.Document","","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".mdi\MSPaper.Document\ShellNew","","REG_SZ"
	WshShell.RegWrite sPrefix1 & ".mdi\PersistentHandler\",sGUID,"REG_SZ"
	WshShell.RegWrite sPrefix2 & ".mdi\Progid","MSPaper.Document","REG_SZ"
	WshShell.RegWrite sPrefix2 & ".mdi\OpenWithList\a","MSPVIEW.EXE","REG_SZ"
	WshShell.RegWrite sPrefix2 & ".mdi\OpenWithProgids\mdi_auto_file",0,"REG_DWORD"
	WshShell.RegWrite sPrefix2 & ".mdi\UserChoice\Progid","MSPaper.Document","REG_SZ"
end if
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s