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.