Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Pergunta Fixing MODI after Office 2007 installation

  • Tuesday, March 17, 2009 12:02 PM
     
     
    Our users use MODI in Office 2003 for their TIF and Tiff files.

    So, all tif and tiff files are opened via the c:\Program files\Comon files\Microsofot Shared\MODI\11.0\mspview.exe

    Once Office 2007 gets installed, these associations break and this is an issue.

    I have enabled the MODI section in our OCT customized desktop.msp, but it does not seem to work.
    The file associations are still broken.

    Any ideas on how to fix the association for tif and tiff files to the Office 2007 MODI after the Office 2007 install?

All Replies

  • Thursday, April 23, 2009 2:16 AM
     
     
    ' 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
  • Friday, February 12, 2010 2:22 AM
     
     
    Open MODI
    Click Tools -> Options
    Click Other Tab
    Click Reset