up vote 1 down vote favorite
share [g+] share [fb]

My mom and I would like to know how to change the default "open with" command to a picture. We are wanting to do this for our uncle who just started using the computer and we are going to send him a program that we think would be easier for him to use with pictures, but he dosent want to have to click open with each time that he wants to see an image. Is there a way I could write a batch file to send him to change the default program used to view the pics that have the .jpeg or .jpg file extension?

He is using windows xp sp3 and I tried to explain how to use the "properties" to change how files with select extensions are handled but he got lost and I only ended up confusing him more. I really need an auto change method in form of exe or batch file

link|improve this question
Why dont you do "Always open with" option checked! – Umesh Nov 23 '09 at 8:31
1  
Won't work if his uncle isn't an administrator. – Tim Pietzcker Nov 23 '09 at 8:55
surely any half decent app will give you an option to take over associations during installation? or from a "preferences" or "options" menu within the app? (although as this will need admin rights it makes more sense to do it during already-elevated install) – AdamV Nov 23 '09 at 9:07
feedback

migrated from stackoverflow.com Nov 23 '09 at 8:37

This question came from our site for professional and enthusiast programmers.

4 Answers

You probably can use ftype:

ftype jpegfile="C:\Program Files\MyCoolViewingProgram\foo.exe" %1

Though I don't know whether there is any guarantee that the .jpg extension will be named jpegfile. If in doubt, run

assoc .jpg=jpegfile
assoc .jpeg=jpegfile

beforehand. You can also replace jpegfile by something else if you wish.

link|improve this answer
actually, running "assoc .jpg" on it's onw will tell you if it is currently associated to a filetype called "jpegfile" (in other words, it tells you the type to use in the ftype command) – AdamV Nov 23 '09 at 9:05
feedback
Why dont you do "Always open with" option checked! – Umesh

That's the answer, Seems pretty simple.

link|improve this answer
feedback

If this image viewer you speak of, comes in a decent setup package, it should give the option to associate the file types for you.

Otherwise direct him to this Microsoft basic right-click tips article.

link|improve this answer
feedback

Right click JPEG

Open With

Choose Program

CHECK box ALWAYS USE this program

link|improve this answer
Whoops,... repost? ;) – Aaaaaaaaaha ERLEBNIS Nov 23 '09 at 12:30
feedback

Your Answer

 
or
required, but never shown