Associate .tif and .mdi files with Microsoft Office Document Imaging

Posted on 2007-10-15
Last Modified: 2012-05-05
I need to associate .tif and .mdi files with Microsoft Office Document Imaging on over 1300 XP clients.

Can I do this with vbscript rather than manually per the below KB article???
Question by:NEARNG
    LVL 20

    Accepted Solution

    If your willing to let vbscript play with your registry try this . . .

    Option Explicit

    Dim objReg, strComputer

    Const HKEY_CLASSES_ROOT = &H80000000
    strComputer = "."

    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
        strComputer & "\root\default:StdRegProv")

    objReg.SetStringValue HKEY_CLASSES_ROOT, ".tif", "", "MSPaper.Document"
    objReg.SetStringValue HKEY_CLASSES_ROOT, ".mdi", "", "MSPaper.Document"
    LVL 65

    Expert Comment

    You can also try the DOS commmands (which can be executed from a VBS file), FTYPE and ASSOC.
    Try this in a batch file, see if this works:

    ASSOC .tif="MSPaper.Document"
    ASSOC .tiff="MSPaper.Document"
    ASSOC .mdi="MSPaper.Document"
    FTYPE MSPaper.Document="rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscr
    een %1"



    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Welcome to part one of a multi-part tutorial series, VBScript for Windows System Administrators.  The goal of this series is to teach non-programmers how to write useful VBS code to automate their environment, and perform tasks faster, and in a more…
    This script will sweep a range of IP addresses (class c only, and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now