Export and Import Default App Associations for New Users in Windows  

Page 5 of 6 FirstFirst ... 3456 LastLast

  1. Posts : 1
    WIN10
       #40

    questorfla said:

    Help!
    I was able to solve most of the problems using a VBS script
    The original wasn't my work. It was made for Chrome but I modified it to add Acrobat
    The last problem is Outlook. Due to naming conventions outlook%202016 will not work
    but it has to represent "outlook 2016" in the script in order to work properly
    Any ideas on how to fix this? I am sure it is easy and i will find it eventually but....
    here is the part that works. I would think that this can be added to for as many programs as needed is done properly
    enter copied code for each program after the line
    WshShell.SendKeys " "
    I am sure you can see where it repeats for adobe.
    By the way, Adobe MUST come after Chrome in order for things to work right.
    Many Thanks to the original posted on Super User :
    https://superuser.com/questions/1069...ser-windows-10

    Code:
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?
    pszAppName=google%20chrome"
    WScript.Sleep 1200
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys " "
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys " "
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?
    pszAppName=adobe%20acrobat%20reader%20dc"
    WScript.Sleep 1200
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys " "
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys " "
    WScript.Quit

    I just went down this exact path
    The appRegName is specified in HKEY_LOCAL_MACHINE (orHKEY_CURRENT_USER)\SOFTWARE\RegisteredApplications

    Outlook 2016 is registered as outlook.application.2016 (I initially thought the %202016 was causing issues.. but percent-encoding only accepts 2 characters as input.. so the app name had to be incorrect.)

    The command you want to add for outlook 2016 will be WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=outlook.application.16"
      My Computer


  2. Posts : 4
    Windows 10 LTSC (1809)
       #41

    jgt1942 said:
    How do you restore the defaults for an existing user?
    ^
    Restoring defaults is very useful, because the XML file(s) list all sorts of different settings, such as:
    Code:
      <Association Identifier=".htm" ProgId="FirefoxHTML" ApplicationName="Firefox" />
      <Association Identifier=".html" ProgId="FirefoxHTML" ApplicationName="Firefox" />
    Code:
      <Association Identifier="http" ProgId="FirefoxURL-308046B0AF4A39CB" ApplicationName="Firefox" />
       <Association Identifier="https" ProgId="FirefoxURL-308046B0AF4A39CB" ApplicationName="Firefox" />
    &
    For a novice, it can be difficult to understand why ProgId is labeled different, in all sorts of ways, heh. :-/

    P.S. Btw., Windows Environment Variables (for some, strange, reason!) are an elusive bunch. After much searching, I was finally able to come up with a couple of URLs @
    Code:
    https://en.wikipedia.org/wiki/Environment_variable
    Code:
    https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables
      My Computer


  3. Posts : 2
    Windows 10 Pro 10.0.16299 Build 16299
       #42

    doesn't work on win 10

    Code:
    Error:  DISM   DISM Assoc Provider: PID=8456 TID=236 Failed to export the user associations from the registry. - CAssocManager::ExportAppAssoc(hr:0x80004002)
    Error:  DISM   DISM Assoc Provider: PID=8456 TID=236 Failed to export the user associations. - CAssocManager::ProcessCmdLine_ExportAppAssoc(hr:0x80004002)
     Error:  DISM   DISM Assoc Provider: PID=8456 TID=236 Failed while processing command export-defaultappassociations. - CAssocManager::ExecuteCmdLine(hr:0x80004002)
    
      My Computer


  4. Posts : 68,917
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #43

    Hello verwijs, :)

    The method in the tutorial still works for me in Windows 10 build 17604.

    Please keep in mind, that this only gets applied to "new" user accounts when created afterwards.
      My Computers


  5. Posts : 57
    Windows 10
       #44

    Sorry, I'm not quite sure I understand how this works. Suppose that my Windows 10 computer only has one user account (a local one created when first installing Windows).

    Given the above, is it possible to use the method here to change default applications based for myself (the current - and only - user)? You mention that it "this only gets applied to "new" user accounts," so I would assume no. If that's the case, do you know of ANY automated way to set default file associations for the current and only user on Windows 10?

    It seems to me like it's stored in the registry; for example, when I used RegistryChagesView to see what changed after setting the default application for images from Windows Photo Viewer to Paint, I got this:

    Export and Import Default App Associations for New Users in Windows-9kgjlku.png

    However, when I try to use a .reg file to import over those entries, I receive the following error:

    Export and Import Default App Associations for New Users in Windows-axqew.png

    I still get the error even after restarting the computer and trying again. Further, I suspect (but haven't yet tested) that the hash value isn't always identical (I guess it's calculated whenever you set the default application?), and I'm not sure what it represents or if it's important.

    Basically, I just need some automated way to set the default applications for the current user, but I keep running into problems. Is there any way to do this?

    Edit:
    Now that I think about it, there HAS to be an automated way to do this. When you install some programs, they will automatically associate certain extensions with themselves (such as when you install Python; .py files are automatically set to run with Python.exe). So there's got to be a way that I can do it too, right?
      My Computer


  6. Posts : 68,917
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #45

    Hello John,

    That's correct. This would only apply the app associations to new accounts created after applying.

    I'm not aware of a way to backup and restore app associations for the current user.
      My Computers


  7. Posts : 6,847
    22H2 64 Bit Pro
       #46

    JohnTravolski said:
    It seems to me like it's stored in the registry; for example, when I used RegistryChagesView to see what changed after setting the default application for images from Windows Photo Viewer to Paint, I got this:
    Export and Import Default App Associations for New Users in Windows-9kgjlku.png

    However, when I try to use a .reg file to import over those entries, I receive the following error:

    Export and Import Default App Associations for New Users in Windows-axqew.png

    I still get the error even after restarting the computer and trying again. Further, I suspect (but haven't yet tested) that the hash value isn't always identical (I guess it's calculated whenever you set the default application?), and I'm not sure what it represents or if it's important.
    Have a look at this:

    Some firefox problems - Page 22 - Windows 10 Forums

    If you run the linked softwares SetUserFTA and GetUserFTA you can use to export/ import file associations.

    Just use the config files edited to make any changes needed.

    Example. Set Paint as default for png :& jpg images:

    Config file:

    Code:
    .jfif, PBrush
    .jpe, PBrush
    .jpeg, PBrush
    .jpg, PBrush
    .png, PBrush

    Export and Import Default App Associations for New Users in Windows-setuserftaconfig-.jpg

    Place config file in SetUserFTA directory and name it SetUserFTA.config

    Run command SetUserFTA.exe SetUserFTA.config to associate.
    Example. Set Windows Photo Viewer as default for png :& jpg images:

    Config file:

    Code:
    .jfif, PhotoViewer.FileAssoc.Tiff
    .jpe, PhotoViewer.FileAssoc.Tiff
    .jpeg, PhotoViewer.FileAssoc.Tiff
    .jpg, PhotoViewer.FileAssoc.Tiff
    .jxr, PhotoViewer.FileAssoc.Tiff

    Export and Import Default App Associations for New Users in Windows-command.jpg

    If you are going to mess about with it - suggest exporting current file associations to a backup config file so that you can restore them.
    Last edited by Callender; 15 Jul 2018 at 16:01. Reason: layout
      My Computer


  8. Posts : 57
    Windows 10
       #47

    This worked beautifully, thank you very much! Seems to be quite the interesting "security" measure taken by Microsoft.
      My Computer


  9. Posts : 3
    Windows 10
       #48

    After setting associations, would changing the SYSTEM permissions to the UserChoice registry sub key to read only lock that value in?
      My Computer


  10. Posts : 20
    Win 10 Enterprise
       #49

    Hi All,

    First - thanks for the tutorial!

    Quick question that I hope someone can help me with.

    We are currently using Windows 10 Ent 1909. Following the steps in the tutorial I assigned the default apps, exported and imported the config via DISM. Created a new user and logged in for the first time to test if the associations were applied correctly (tested with PDF files). They did - everything looks correctly according to the Settings tab as shown below:

    Export and Import Default App Associations for New Users in Windows-snag-0008.png

    That is all good, however when I open a PDF file for the first time I'm getting the dialog below, asking to If I want to ''Keep using this app" and a checkbox to "Always use this app to open .pdf files".

    Export and Import Default App Associations for New Users in Windows-snag-0007.png

    Is there a way to bypass this message entirely and set pdf files to open in Reader without any messages upon first run for new users?

    Thank you
      My Computer


 

Tutorial Categories

Export and Import Default App Associations for New Users in Windows Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:11.
Find Us




Windows 10 Forums