AppDeploy.com

 


How to Change a File Association for All Users?

Click here to associate this thread with a Package KB article.
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [AppDeploy Forums] >> Scripting >> How to Change a File Association for All Users? Page: [1]
Login
Message << Older Topic   Newer Topic >>
How to Change a File Association for All Users? - 7/30/2010 6:50:04 AM   
mcompton69

 

Posts: 30
Score: 0
Joined: 4/10/2006
Status: offline
We have a very (very, VERY) ropey but essential piece of software called Valid Viewer, which when installing often does not correctly take over/set/change the file association of both TIF and TIFF files.

I have written a reg file to set the file association of a machine, but it seems that if a user has already logged on once on that machine then their preference over-rides anything i set on a machine level.

Is there any way to force a machine and all existing profiles to change a file association to a paticular program?
Post #: 1
RE: How to Change a File Association for All Users? - 7/30/2010 7:05:11 AM   
VBScab


Posts: 6634
Score: 192
Joined: 9/5/2006
From: London, UK
Status: online
The first lesson to learn here is that HKCR (where you will probably have gone first to change the file associations) is an amalgam of HKCU\Software\Classes and HKLM \Software\Classes. Your problematic users will have the association set in HKCU\Software\Classes: Windows will use settings from the HKCU hive in preference to those in HKLM.

Probably the most effective way to move the settings from HKCU to HKLM is by setting up an Active Directory job to run an appropriate script. As ever, make sure your script error-traps EVERYTHING - always assume that NOTHING will work, even setting up objects like WScript.Shell.

< Message edited by VBScab -- 7/30/2010 7:06:04 AM >


_____________________________

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. PMs and personal emails will be ignored.

(in reply to mcompton69)
Post #: 2
RE: How to Change a File Association for All Users? - 8/2/2010 9:38:07 AM   
mcompton69

 

Posts: 30
Score: 0
Joined: 4/10/2006
Status: offline
OK, we now have a plan, but need some assistance.

I want to create a script and put it in the All Users\Start Menu\Startup folder - this is a better system for us as we can amend the deployment package, rather than targeting users via AD.

VBScab - could you assist with coming up with the script as your name seems to suggest thats your field of expertise (although I would prefer a batch file)?!

I have played around with both assoc and ftype, but for some reason, once a user has change the open with to a program and also ticked the tick box to remember that setting, assoc does not seem able to overide that setting - even if both assoc and the file association are set in the same profile (so it does not appear to be the issue you have mentioend above). Assoc reports that the file association is .tif=vview2 - but in fact tif files still only open with the WINdows Picture and Fax viewer.

Any assistance greatly appreciated!

< Message edited by mcompton69 -- 8/2/2010 9:39:53 AM >

(in reply to VBScab)
Post #: 3
Page:   [1]
All Forums >> [AppDeploy Forums] >> Scripting >> How to Change a File Association for All Users? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.031