File Associations with a Script

  • Thread starter Thread starter ADAM
  • Start date Start date
A

ADAM

I am trying to set file association with a script so
that .jpeg file always open in Imaging. I found a paper
that explains how to do it
(http://www.jsiinc.com/suba/tip0100/rh0108.htm) but I
can't get it to work. I go into are active batch file
script that we run at logon and put these two commands at
the very bottom.

assoc .jpeg=jpegfile
ftype jpegfile="C:\Program Files\Windows
NT\Accessories\ImageVue\kodakimg.exe" %1

The script runs but does not change the
associations! Did I miss something? Also if anyone knows
a better way to force file associations without having to
edit each individual PC that would be helpful too. Any
help is greatly appreciated.
 
I am trying to set file association with a script so
that .jpeg file always open in Imaging. I found a paper
that explains how to do it
(http://www.jsiinc.com/suba/tip0100/rh0108.htm) but I
can't get it to work. I go into are active batch file
script that we run at logon and put these two commands at
the very bottom.

assoc .jpeg=jpegfile
ftype jpegfile="C:\Program Files\Windows
NT\Accessories\ImageVue\kodakimg.exe" %1

The script runs but does not change the
associations! Did I miss something? Also if anyone knows
a better way to force file associations without having to
edit each individual PC that would be helpful too. Any
help is greatly appreciated.

You need admin permissions to use those commands, as they write to
HKEY_LOCAL_MACHINE\Software\Classes

If you grant your users Full Control of the key and sub-keys, it should work.


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top