Jump to content

login script needed to set file associations


Recommended Posts

Posted

We have some pcs in our school where the association for jpg file is set to File a Fax viewer. When the jpg is open it has an error about something missing from registry.

 

I need a login script that will set the jpg associations to a diffarent program.

 

Does any one know the coding needed to do this????

Posted
Think the error you mean is from Photo Editor - there is instructions on Microsoft site how to change the registry but its a pain if you have lots of machines to do. Can't help you with the script - sorry
Posted

ftype jpgfile="C:\Windows\System32\mspaint.exe" "%1"
assoc .jpg=jpgfile

 

ftype jpegfile="C:\Windows\System32\mspaint.exe" "%1"
assoc .jpeg=jpegfile

 

These should work from a logon script, associating .jpg and .jpeg with Microsoft Paint. The problem with Picture and Fax viewer is that it doesn't have its own .exe file. It's a component of explorer.exe, so I don't think using ftype could be used.

 

You could use the same method above for associating with Paint Shop Pro and/or Adobe Photoshop however :)

Posted
ftype jpgfile="C:\Windows\System32\mspaint.exe" "%1"
assoc .jpg=jpgfile

 

ftype jpegfile="C:\Windows\System32\mspaint.exe" "%1"
assoc .jpeg=jpegfile

 

These should work from a logon script, associating .jpg and .jpeg with Microsoft Paint. The problem with Picture and Fax viewer is that it doesn't have its own .exe file. It's a component of explorer.exe, so I don't think using ftype could be used.

 

You could use the same method above for associating with Paint Shop Pro and/or Adobe Photoshop however :)

 

I'm thinking to install paint.net

If i want jpg files to be associated with paint.net what do i do?

 

the paint.net uses "PaintDotNet.exe"

 

I have tried putting in %SystemRoot%\system32\mspaint.exe into the script to test it worked.

 

When i login as admin and run it. The jpg file is not changed.

Posted

I downloaded Paint.net v3.36, which I found installs to C:\Program Files\Paint.NET so you simply update the path as appropriate:

 

ftype jpgfile="C:\Program Files\Paint.NET\PaintDotNet.exe" "%1"
assoc .jpg=jpgfile

Posted
I downloaded Paint.net v3.36, which I found installs to C:\Program Files\Paint.NET so you simply update the path as appropriate:

 

ftype jpgfile="C:\Program Files\Paint.NET\PaintDotNet.exe" "%1"
assoc .jpg=jpgfile

 

Hi,

i copied the last bit of code you posted.

I changed the path to the desktop as that where i have installed for the moment.

When i run and then check a jpg file it still open will fax viewer.

 

DG

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...