Windows 10: Export and Import Default App Associations for New Users in Windows  

Page 5 of 5 FirstFirst ... 345
  1.    23 Aug 2017 #40

    questorfla said: View Post

    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 ComputerSystem Spec


  2. Posts : 2
    Windows 10 LTSB
       04 Dec 2017 #41

    jgt1942 said: View Post
    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 ComputerSystem Spec


  3. Posts : 2
    Windows 10 Pro 10.0.16299 Build 16299
       26 Feb 2018 #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 ComputerSystem Spec


  4. Posts : 31,389
    64-bit Windows 10 Pro build 18219
    Thread Starter
       26 Feb 2018 #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 ComputersSystem Spec

  5.    15 Jul 2018 #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:

    Click image for larger version. 

Name:	9KGjlKu.png 
Views:	15 
Size:	27.6 KB 
ID:	195915

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

    Name:  aXqEw.png
Views: 176
Size:  8.5 KB

    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 ComputerSystem Spec


  6. Posts : 31,389
    64-bit Windows 10 Pro build 18219
    Thread Starter
       15 Jul 2018 #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 ComputersSystem Spec

  7.    15 Jul 2018 #46

    JohnTravolski said: View Post
    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:
    Click image for larger version. 

Name:	9KGjlKu.png 
Views:	15 
Size:	27.6 KB 
ID:	195915

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

    Name:  aXqEw.png
Views: 176
Size:  8.5 KB

    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

    Name:  SetUserFTAconfig .jpg
Views: 174
Size:  20.1 KB

    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

    Name:  command.jpg
Views: 175
Size:  35.7 KB

    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 ComputerSystem Spec

  8.    16 Jul 2018 #47

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


 
Page 5 of 5 FirstFirst ... 345

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 Xbox Windows Phone


Related Threads
How to Restore Default Apps for File Type Associations in Windows 10 A default app is the program that Windows uses automatically when you open a particular file type or protocol. Default app associations for file extensions are a per user...
In Windows 8, I would plug my phone in and it would display all the pictures on the phone and highlight the new ones. I would then click IMPORT. Boom. Done. With Windows 10 it doesnt seem as straight forward. I plug my phone in and sometimes...
Can't find an option to import bookmarks in Spartan. Please let me know if I am missing it. Thanks.
No way to import bookmarks? in Browsers and Email
In the Edge browser is there no way to import bookmarks? They've shown up in Spartan but not this time with 10122. Jim
How to Import and Export Bookmarks via HTML in Firefox This tutorial will show you how to easily export and import your bookmarks in the Mozilla Firefox web browser using HTML files. As well as acting as a backup of your bookmarks this is also...
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 19:24.
Find Us