Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Comand Line for Change Default Program


  • Please log in to reply
3 replies to this topic

#1
El_Esteban

El_Esteban

    Newbie

  • Member
  • 16 posts
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:


How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,672 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

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.micro...y/hh824855.aspx
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg

#3
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,031 posts
  • OS:none specified
  • Country: Country Flag

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, 29 September 2013 - 12:17 PM.


#4
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,031 posts
  • OS:none specified
  • Country: Country Flag

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, 29 September 2013 - 12:37 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN