1

I have used this site for years for finding answers. This is my first question today..lol

I have a Dell 2-in-1 laptop with touchscreen with windows 8.1 (64 bit) installed.

So i use it in two ways. (1) traditional laptop (using keyboard) (2) as tablet (using touchscreen)

I will be speicific here.

For example when using keyboard i would like to view images with picasa image viewer. When using touchscreen i would like to use the default images app of windows 8.1

I know how to change file associations in windows

  1. right click and open with

  2. control panel > default programs

etc. etc.

but it all takes few clicks or keypresses.

The problem multiplies when i want to change association of more than one file type.. (e.g. not only .jpg but .png .gif etc......same way i want to use different video player for different modes)

So can we make any command line batch file / regedit script that automates this process at single click. or are there any other ideas about this.

Suggestions are welcome. sorry for the long explanation.

1 Answer 1

1

From How to Use the Assoc Command:

To display a list of file extensions and their associations, type assoc at a command prompt, and then press ENTER.

To display the association for a specific file extension, type assoc .<­xxx> at a command prompt, and then press ENTER, where <­xxx> is the file extension whose association you want to view.

To change the association for a specific file extension, type assoc .<­xxx>=<­file type> at a command prompt, and then press ENTER, where <­xxx> is the file extension whose association you want to change, and <­file type> is the program, dynamic data exchange (DDE), or OLE object you want to associate with the file extension.

To delete the association for a specific file extension, type assoc .<­xxx>= at a command prompt, and then press ENTER, where <­xxx> is the file extension you want to delete.

The bold part is what you care about.

To set .jpg as picasa, use:

assoc.jpg=C:\Path\To\Picasa

in a command prompt or batch file. Remember that it must be ran with UAC admin, or on an admin account if windows XP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.