Best Practices Question

Tiff File association

03/30/2012 8444 views
We are using Windows 7 and whenever we are downloading a .tiff file from an application it is asking for a file association. Now for this the user has to go to "Open With">"Choose Default program" and choose "Windows Photo Viewer". can this solution be automated and deployed to all of them rather than they doing it. Also, it shows the protected mode prompt, how to diable that?
Answer Summary:
0 Comments   [ + ] Show comments


Community Chosen Answer

Take a look at this article:
Answered 03/30/2012 by: dchristian
Red Belt

All Answers

You can use this Script :
Option Explicit
Dim objShell
set objShell = WScript.CreateObject ("WScript.Shell")

'Change this line to associate your <.abc> to open with
addFileAssociation ".txt", "notepad.exe"

Sub addFileAssociation( fileExt, whichApp )
If ( Left(fileExt, 1) <> "." ) Then
fileExt = "." & fileExt
End If
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & fileExt & "\Application", whichApp
End Sub
Answered 03/30/2012 by: akki
4th Degree Black Belt

Yes it possible to automate it. I would advise to record the file association type change you want to make with a tool like Install Watch (freeware). After that, you can export the registry changes and deploy it using the method of your choice (wrapped in a .vbs, .bat, .cmd).
Answered 03/30/2012 by: Mencaliss
Senior Purple Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ