Setting up file associations for all users of a PC

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.
 
J

Jim

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
 
M

Mike Plichta

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top