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   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer


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

Please log in to comment
Answer this question or Comment on this question for clarity


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
Fourth Degree Black Belt

Please log in to comment
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

Please log in to comment