• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
El_Esteban

Comand Line for Change Default Program

4 posts in this topic

Hello, is there any option to change default program for open files like JPG or AVI, by command line or silently? Can be it maked in Windows 8? I want to change for example JPG to Windows Photo Viewer and AVI to MPC (Media Player Classic)

Thanks :yes:

0

Share this post


Link to post
Share on other sites

DISM can do it to a mounted image. I never tried it myself. It would appear the first step is to GET the associations, then EXPORT the one you want to modify. You should get an XML response. Then you could see how that XML looks like and how to modify it. Then use the IMPORT option to put it back. Also, it seems like you can use it on a live OS, since the documentation shows examples of using the /ONLINE option.

http://technet.microsoft.com/en-us/library/hh824855.aspx

0

Share this post


Link to post
Share on other sites

Note to self, remember to set some associations via XML with a signature name, search for registry changes after applying XML via DISM, then see if we can't find the over-riding setting location to avoid this DISM nonsense.

Some info's on how associations worked in W7.

Update: Did some testing, W81/2012R2 is throwing in a new redirect in HKCR. See here, Windows created an "XXX_auto_file" key and the settings are applied in the redirect. Maybe it's that easy.

The hex bits just say "%SystemRoot%\system32\NOTEPAD.EXE %1"

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\.JINJE]@="JINJE_auto_file"
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\JINJE_auto_file][HKEY_CLASSES_ROOT\JINJE_auto_file\shell][HKEY_CLASSES_ROOT\JINJE_auto_file\shell\edit][HKEY_CLASSES_ROOT\JINJE_auto_file\shell\edit\command]@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\  00[HKEY_CLASSES_ROOT\JINJE_auto_file\shell\open][HKEY_CLASSES_ROOT\JINJE_auto_file\shell\open\command]@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\  00

When I remember, I'll have to take a look and see what we need to do to make registry switch AVI to MPC.

Edited by MrJinje
0

Share this post


Link to post
Share on other sites

There used to be a trick to use the photoviewer.dll (because no .exe existed in W7), still works in W8 / W81, in case any future readers want to test it out.

%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1 
Edited by MrJinje
0

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.