none
How do you set default programs for all users when deploying Windows 8.1? RRS feed

  • Question

  • I have my Windows 8.1 image set up the way I want including the start screen, theme, etc. But how can I set the default programs for all users. Most of out computers are non-touch and I want the desktop apps (e.g. Windows Photo Viewer), not the store apps to be the default for opening pictures, videos, etc. Can that be done?
    Wednesday, November 13, 2013 6:18 PM

Answers

  • Great question, this has been bugging me too!

    So, I did some research by using "Set Default Programs" app in Windows 8. Then I ran the super ProcMon.exe tool from Sysinternals.com <Thanks Mark!>

    After filtering out the junk, I could see some *interesting* writes to the registry:

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
    "Hash"="57y87/ogggU="
    "ProgId"="PhotoViewer.FileAssoc.Jpeg"
    

    But the "Hash" part had me concerned. I did some internet searching for the hash, and came across a post and a pointer to a blog with some answers.  This is both good news and bad.

    Background:

    One of the problems with Windows XP is that any program can come in and party on the entire system. No, I don't want you to put a shortcut on the desktop, install a crappy IE Toolbar, and change the default file association for *.jpg files to your app, I just wanted to play a stupid game. Since Windows 7, Microsoft has been attempting to block that functionality from the stupid applications, and give them back to the user. Take note of the last line in the ITaskbarList3 interface:

       Applications cannot programmatically pin themselves to the taskbar. That functionality is reserved strictly for the user.

    Of course that sucks for us IT Pros who may wish to create *default* working environments for corporate images, but there are some tricks we can do.

    Solution:

    This blog appears to have the answer: http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx

    New for Windows 8 is a dism command: /Get-DefaultAppAssociations that allows you to export a control case from a known good computer. Microsoft the supports importing the exported xml file via GPO. For example, before I changed the file association, .AVI was pointing to the Modern App, after the change the /export-DefaultAppAssociations shows change to the new app:

    From: 
      <Association Identifier=".avi" ProgId="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt" ApplicationName="Video" />
    To:
      <Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC media player" />

    I am still doing some investigation to see if a GPO is required, or if you can inject the association into a local user account. Also, if you do have some Modern Windows 8 Touch Tablets, it would recomend keeping most of the Modern App defaults in place, perhaps seperate GPO's for Desktops/Laptops vs Tablets?

    -k


    Keith Garner - keithga.wordpress.com

    Thursday, November 14, 2013 6:54 AM
    Moderator
  • It worked, but one thing I did notice is that the Admin account did not apply the settings. However when I created a new user and logged on, the application associations were set the way I exported them.

    The answer is:

    Run "DISM /online /export-defaultappassociations:\\Server\Share\AppAssoc.xml" on the system that has associations set the way you want.

    Then in your task sequence, at the end of all your other apps being installed add a Run Command Line with the following: "DISM /online /import-defaultappassociations:\\Server\Share\AppAssoc.xml"

    • Marked as answer by Dan_Vega Thursday, February 20, 2014 7:34 PM
    Thursday, February 20, 2014 7:34 PM

All replies

  • Great question, this has been bugging me too!

    So, I did some research by using "Set Default Programs" app in Windows 8. Then I ran the super ProcMon.exe tool from Sysinternals.com <Thanks Mark!>

    After filtering out the junk, I could see some *interesting* writes to the registry:

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
    "Hash"="57y87/ogggU="
    "ProgId"="PhotoViewer.FileAssoc.Jpeg"
    

    But the "Hash" part had me concerned. I did some internet searching for the hash, and came across a post and a pointer to a blog with some answers.  This is both good news and bad.

    Background:

    One of the problems with Windows XP is that any program can come in and party on the entire system. No, I don't want you to put a shortcut on the desktop, install a crappy IE Toolbar, and change the default file association for *.jpg files to your app, I just wanted to play a stupid game. Since Windows 7, Microsoft has been attempting to block that functionality from the stupid applications, and give them back to the user. Take note of the last line in the ITaskbarList3 interface:

       Applications cannot programmatically pin themselves to the taskbar. That functionality is reserved strictly for the user.

    Of course that sucks for us IT Pros who may wish to create *default* working environments for corporate images, but there are some tricks we can do.

    Solution:

    This blog appears to have the answer: http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx

    New for Windows 8 is a dism command: /Get-DefaultAppAssociations that allows you to export a control case from a known good computer. Microsoft the supports importing the exported xml file via GPO. For example, before I changed the file association, .AVI was pointing to the Modern App, after the change the /export-DefaultAppAssociations shows change to the new app:

    From: 
      <Association Identifier=".avi" ProgId="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt" ApplicationName="Video" />
    To:
      <Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC media player" />

    I am still doing some investigation to see if a GPO is required, or if you can inject the association into a local user account. Also, if you do have some Modern Windows 8 Touch Tablets, it would recomend keeping most of the Modern App defaults in place, perhaps seperate GPO's for Desktops/Laptops vs Tablets?

    -k


    Keith Garner - keithga.wordpress.com

    Thursday, November 14, 2013 6:54 AM
    Moderator
  • I haven't messed with this yet, but it might be possible that file associations are part of the options copied with CopyProfile.  We have new touch ultrabooks we're trying to get 8.1 on.  Once I can get that working, I'll test to see if CopyProfile will capture that.

    --smthng

    Thursday, November 14, 2013 1:28 PM
  • @smthng CopyProfile doesn't work for associations. I know because I set them up prior to capturing my reference image and I already use copyprofile to set the default start screen tiles for all uses, associations did not carry over.

    @Keith Great write up, I'll be very interested to hear more about what you find out. For tablets I do intend to let them use the default modern apps, but it won't be an issue for me since I've setup a separate deployment share for imaging tablets and a few other specialized machines.


    Our laptops and some desktops are not on the domain so I'll need a non-GPO way to set those defaults.
    • Edited by Dan_Vega Thursday, November 14, 2013 4:26 PM
    Thursday, November 14, 2013 4:23 PM
  • Looking forward to reading a success story in regard to controlling open-with / default application associations in a domain, somehow.  Nothing out there works yet.  Registry, DISM, GPO, GPP, etc.... just doesn't fly for 8.1 :-(
    Friday, December 13, 2013 11:58 PM

  • Solution:

    This blog appears to have the answer: http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx

    New for Windows 8 is a dism command: /Get-DefaultAppAssociations that allows you to export a control case from a known good computer. Microsoft the supports importing the exported xml file via GPO. For example, before I changed the file association, .AVI was pointing to the Modern App, after the change the /export-DefaultAppAssociations shows change to the new app:

    From: 
      <Association Identifier=".avi" ProgId="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt" ApplicationName="Video" />
    To:
      <Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC media player" />

    Awesome! that is what I was looking for! I tested that solution and it works.

    It helps to first restore all Default Programs to desktop apps by using the Default Programs app, option Set Default Programs) in Windows 8 and clicking button Set This program as default (e.g. Windows Photo Viewer, Adobe Reader, Windows Media Player) next to each Desktop app you want to open supported files, takes maybe 15 seconds to configure it they way you want.

    Then export all file associations via DISM command (can be imported via DISM too later on if somebody doesn't want to mess with GPOs) and for me the GPO route to deploy them domain wide to all machines running windows 8 (with WMI filtering).

    It works very well!

    Tuesday, February 18, 2014 7:07 PM
  • Did you do this on Windows 8.1?

    Going the non-GPO route would you suggest adding a run command line in the state restore phase and execute the dism import command?

    Something like: Dism /online /Import-DefaultAppAssociations:\\Server\Share\AppAssoc.xml

    Tuesday, February 18, 2014 7:35 PM
  • Did you do this on Windows 8.1?

    Going the non-GPO route would you suggest adding a run command line in the state restore phase and execute the dism import command?

    Something like: Dism /online /Import-DefaultAppAssociations:\\Server\Share\AppAssoc.xml

    yes, I tested it on windows 8.1 x64 Pro edition, and also on 8.1 x64 Enterprise Evaluation edition in VM lab as well. all works fine, just need to make sure that you have all the desktop apps installed (e.g. if they are optional components like Windows Live Mail) before the imported settings kick in.

    haven't tested import via DISM, but I would try the switch you mentioned (/Import-DefaultAppAssociations).




    • Edited by Kuba_L Tuesday, February 18, 2014 8:30 PM
    Tuesday, February 18, 2014 8:28 PM
  • At the request of a co-worker I'm building a 32bit Windows 8.1 image (I only had a 64bit image built) so I'll give this a try during testing. Hopefully it works out, if so I'll post back. I only deal with Enterprise so I'm not worried if any of this doesn't apply to consumer editions. Thanks for replying.
    Tuesday, February 18, 2014 10:08 PM
  • It worked, but one thing I did notice is that the Admin account did not apply the settings. However when I created a new user and logged on, the application associations were set the way I exported them.

    The answer is:

    Run "DISM /online /export-defaultappassociations:\\Server\Share\AppAssoc.xml" on the system that has associations set the way you want.

    Then in your task sequence, at the end of all your other apps being installed add a Run Command Line with the following: "DISM /online /import-defaultappassociations:\\Server\Share\AppAssoc.xml"

    • Marked as answer by Dan_Vega Thursday, February 20, 2014 7:34 PM
    Thursday, February 20, 2014 7:34 PM
  • You can Change Windows 8.1 file associations for all users by:

    1. Setting up the file extensions on a reference device to your liking
    2. exporting the Default Application Associations
    3. Using DISM to apply the AppAssox.xml file to your image

    I provide a working example of this on a recent blog write-up which includes all needed syntax:

    MDT Windows 8.1 image deployment customization

    check under the Change Windows 8.1 file associations section of the write-up


    Sunday, February 23, 2014 11:59 PM
  • Your link doesn't work right. Your blog covers servicing an offline image whereas in my example the associations are set and captured during the creation of the reference image. Either can work depending on whether the image has already been created or not.

    For what it's worth in your blog you say a customized start screen only works for domain joined machines but I haven't found this to be the case. I set the start screen in the reference image and then use copyprofile in the the unattend.xml of the task sequence to deploy to your targets. It's worked for all my machines whether they are on a domain or not. I use this to set the theme as well.

    Monday, February 24, 2014 2:46 PM