Tom's Hardware > Forum > Windows XP > Configuration & Customize > Repair TIF file associations in XP

Repair TIF file associations in XP

Forum Windows XP : Configuration & Customize - Repair TIF file associations in XP

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Hello,

I'm trying to identify the registry keys needed in order to
programmatically reset TIF file associations to their default
(Microsoft Picture and Fax Viewer) in XP. I'm having a very tough time
getting it right.

I have tried several different methods, and I'm mystified. There is a
great little utility written by Ramesh Srinivasan
(http://windowsxp.mvps.org/imgassofix.htm) that works perfectly for
such a purpose (check TIF and TIFF checkboxes and click Repair
Associations), yet I can't seem to emulate the functionality in my
code.

Here are the two most promising methods that I've tried but don't work
for me:

METHOD #1 - Registry File (Thanks to Doug Knox)

********** Registry File Listing : BEGIN ********
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.tiff]
"Content Type"="image/tiff"
"PerceivedType"="image"
@="TIFImage.Document"

[HKEY_CLASSES_ROOT\.tiff\OpenWithProgids]
"TIFImage.Document"=hex(0):

[HKEY_CLASSES_ROOT\.tiff\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\.tif]
"Content Type"="image/tiff"
"PerceivedType"="image"
@="TIFImage.Document"

[HKEY_CLASSES_ROOT\.tif\OpenWithProgids]
"TIFImage.Document"=hex(0):

[HKEY_CLASSES_ROOT\.tif\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\TIFImage.Document]
"EditFlags"=dword:00010000
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\

00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,\

32,00,5c,00,73,00,68,00,69,00,6d,00,67,00,76,00,77,00,2e,00,64,00,6c,00,6c,\
00,2c,00,2d,00,33,00,30,00,36,00,00,00
"ImageOptionFlags"=dword:00000000

[HKEY_CLASSES_ROOT\TIFImage.Document\DefaultIcon]
@="shimgvw.dll,4"

[HKEY_CLASSES_ROOT\TIFImage.Document\shell]

[HKEY_CLASSES_ROOT\TIFImage.Document\shell\open]
"MuiVerb"="@shimgvw.dll,-550"

[HKEY_CLASSES_ROOT\TIFImage.Document\shell\open\command]
@="rundll32.exe C:\\WINDOWS\\System32\\shimgvw.dll,ImageView_Fullscreen
%1"

[HKEY_CLASSES_ROOT\TIFImage.Document\shell\open\DropTarget]
"Clsid"="{E84FDA7C-1D6A-45F6-B725-CB260C236066}"

[HKEY_CLASSES_ROOT\TIFImage.Document\shell\printto]

[HKEY_CLASSES_ROOT\TIFImage.Document\shell\printto\command]
@="rundll32.exe C:\\WINDOWS\\System32\\shimgvw.dll,ImageView_PrintTo
/pt \"%1\" \"%2\" \"%3\" \"%4\""

************* Registry File Listing: END **********




METHOD #2 - VBScript File (Thanks to Ramesh Srinivasan)

************* VBScript File Listing: BEGIN **********
Option Explicit

Dim WSHShell

Set WSHShell = WScript.CreateObject("WScript.Shell" )
Call
WshShell.RegWrite("HKLM\SOFTWARE\Classes\TIFImage.Document\EditFlags",
"65536", "REG_DWORD" )
Call
WshShell.RegWrite("HKLM\SOFTWARE\Classes\TIFImage.Document\FriendlyTypeName",
"@%SystemRoot%\system32\shimgvw.dll,-306", "REG_EXPAND_SZ" )
Call
WshShell.RegWrite("HKLM\SOFTWARE\Classes\TIFImage.Document\ImageOptionFlags",
"0", "REG_DWORD" )
Call
WshShell.RegWrite("HKLM\SOFTWARE\Classes\TIFImage.Document\DefaultIcon\",
"shimgvw.dll,4", "REG_SZ" )
Call
WshShell.RegWrite("HKLM\SOFTWARE\Classes\TIFImage.Document\shell\open\MuiVerb",
"@shimgvw.dll,-550", "REG_SZ" )

************* VBScript File Listing: END **********




If I manually change the TIF file association to something like MODI or
MSPaint, and then use Ramesh's utility, it restores it perfectly, but
neither of these other methods seems to restore them correctly; the
associations remain as what I changed them to. Is it dependent upon
the current user? Is there some additional action or key that must be
changed to activate the new association?

Can anyone please shed some light on this for me? Also, anyone know
how to do the same thing in Server 2003?

Thank you very much -

Sponsored Links
Register or log in to remove.
Tom's Hardware > Forum > Windows XP > Configuration & Customize > Repair TIF file associations in XP
Go to:

There are 542 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them