I'm at my wit's end. I need a way to change the file association for .TIF and .TIFF on all my workstations and laptops. I have been changing it by hand all day so my users can work, but I want a way to do it on all machines before the users notice the problem. I tried to create a .reg file like the MS KB suggests, but I get an error (Not all data was successfully written to the registry. Some keys are open by the system or other process.) when I try to import the file. I tried rebooting, running it before anyone logged in, but it still didn't work. So if there are any scripting geniuses out there that want to help save my sanity, I would appreciate it! Oh, what caused the sudden problem? I'm blaming MS's Kodak Imager patch (KB932810).
Could you trigger a repair of the program you want to have those files associated with? Might that repair the association?
Don't even ask why I have this script: REM Restores MS Office File Type Associations assoc .doc=Word.Document.8 assoc .dochtml=wordhtmlfile assoc .docmhtml=wordmhtmlfile assoc .docxml=wordxmlfile assoc .dot=Word.Template.8 assoc .pot=PowerPoint.Template.8 assoc .pps=PowerPoint.SlideShow.8 assoc .ppt=PowerPoint.Show.8 assoc .rtf=Word.RTF.8 assoc .wbk=Word.Backup.8 assoc .xlc=Excel.Chart.8 assoc .xlm=Excel.Macrosheet assoc .xls=Excel.Sheet.8 assoc .xlt=Excel.Template assoc .xlw=Excel.Workspace Just drop to a DOS prompt on a machine that works properly and type "assoc". This shows you the complete list of file associations. Find your file type and use the above syntax to recreate that file association on your "broken" computer. Good luck!
I guess I'll explain how I figured this out We have the Office 2003 Viewers on our base image. My installation scripts for Office 2000 didn't unstall the Viewers so we wound up with many computers with both the Office 2003 Viewers AND Office 2000 Standard installed. Pushed some Office 2003 patches out and the Viewers decided that THEY were going to associate themselves with the Office filetypes after patching. Uninstalled the Viewers...no more Office filetype associations :doh: Had to push my script out in short order Oh yeah, Office 2003 Standard installation does NOT uninstall the Office 2003 Viewers. Idiots :rant2:
Ok, got it... Code: REM Restores TIFF file associations assoc .tif=MSPaper.Document assoc .tiff=MSPaper.Document Which works wonderful. But if one of those (.tif) doesn't exist, then it doesn't set the association. Any one have a quick solution?
Well you do make things difficult! Just a couple quick thoughts... If you open regedit and browse to HKEY_CLASSES_ROOT, you'll notice a list of extensions at the top. These extensions have a (Default). So for .tif the Default shows MSPaper.Document. Now go down further to MSPaper.Document and you'll see a Shell>Open>Command under it. The command line here is what should open a .tif when you choose to open it. The %1 you'll usually see is a variable for the file you are clicking on. My "thoughts" are you could export this set of registry keys and import the reg file to another computer to duplicate the same associations. PLEASE try this on a test box first if you go this route. David
I was playing with those registry keys... The error I mention in my first post was from manipulating those keys. I think I'll blast the code I posted before and see who many machines still need to be fixed. Should be less than the 300 broken workstations I have now! Thanks you all your help, guys!
Not sure if you got this all resolved, but we were able to fix the tiff issue by doing the following. 1. Create the following Registry File (Found Online). We found it hard to export the registry settings. This will make your tiff images default to Windows Picture and Fax Viewer. We called it tiff_fix.reg. 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\"" 2. Then created a batch file that we called in the ran the update in. ::Installs MSOffice Service Pack 3 Office2003SP3-KB923618-FullFile-ENU.exe /q ::Installs Tif File Extension regedit /s tiff_fix.reg :: Restores TIFF file associations to MS Office Printer assoc .tif=MSPaper.Document assoc .tiff=MSPaper.Document **This may be a little too late, but hopefully this helps.
The code I posted in post #7 seems to have worked for my entire network, so I'm happy for now. But I think I'll take that TIFF registry file for future reference... Thanks!