Setting up file associations for all users of a PC

  • Thread starter Thread starter hhsu68
  • Start date Start date
H

hhsu68

It seems that the file associations which you can set up to associate file
extensions with particular applications are specific to a user of a PC. Is
there any way to set up file associations so that they apply to all users of
a PC? We want administrators to be able to set up a PC so that regular users
of that PC do not have to perform any setup on their own. Thanks for your
help.
 
hhsu68 said:
It seems that the file associations which you can set up to associate file
extensions with particular applications are specific to a user of a PC. Is
there any way to set up file associations so that they apply to all users
of
a PC? We want administrators to be able to set up a PC so that regular
users
of that PC do not have to perform any setup on their own. Thanks for your
help.
The administrator can change the default associations by editing the
registry. You will find instructions in Appendix A of the Windows Registry
Guide by Jerry Hunnicut.
Jim
 
From screwing around with this for hours (Microsoft made this way too complicated), here's what I found out. Our goal was to make jpg files open with microsoft Office Picture Manager instead of the windows picture viewer.

This following entry gets created if a user uses the "open this file with" command and checks the box for always use this program. This is a per user, per computer setting.
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.JPG]
"Application"="OIS.EXE"

Note that OIS.exe is the executable for microsoft office picture manager. This user has used the "Open this file with" command.

Should the above registry key not exist, it will next look at HKEY classes root.
[HKEY_CLASSES_ROOT\.jpg]

The default parameter will tell it what type of file to treat it as. This is the only time I've ever see the default key used for anything in the registry. When Default says "OISjpegfile" it opens with the office image manager. when it says jpegfile, it opens with windows picture viewer.

So lets say that it says "OISjpegfile". It will then query
[HKEY_CLASSES_ROOT\OISjpegfile\shell\open\command
To see what executable opens an oisjpegfile.

If it says "jpegfile" it will query
[HKEY_CLASSES_ROOT\jpegfile\shell\open\command
and open with that program instead.

So changing the HKEY classes root key on a computer is easy, but you'd have to write a script that clears out the hkey current user key for every user or delete user profiles. I'm not sure yet if the HKCurrent User key gets copied from default user account or not, but you might have to fix it for the default user's HKey_current_user as well as delete profiles if you were going that route.
 
Back
Top