/build/static/layout/Breadcrumb_cap_w.png

Setting Default App Assocations as a "Post-Install" Task

Hello,


I am new to KACE and new to scripting. I have taken over a pre-existing environment and I'm still trying to learn the ropes with a lot. I am trying to figure out how to set a post-installation task for a scripted installation. I've seen several posts about this in the past but they either do not work or they are not applicable to our situation.

I have tried to attach the xml file with the command dism /online /Import-DefaultAppAssociations:DefaultAppAssociations.xml but that isn't working. The task fails. (I am guessing I am calling it incorrectly. I don't know what the file path should be of the file when KACE uses it)

I tried to zip a batch file that calls the xml file (along with the xml) file and that doesn't work either. It says the task was successful but when the image is pushed, the application associations have not been changed.

Is there anything someone can suggest?

Thank you


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Channeler 3 years ago
Red Belt
0

Yes, as you have found, this is not a straight forward path, and it stopped working properly since Windows 10 1803 or something. The easiest way out is to enforce these via GPO.

If there are no errors then, the KACE SDA was able to:

1-Download the ZIP into the computer
2-Unzip it
3-Execute the designated target file (in this case your BAT file).

Have you considered the possibility of the XML or BAT file routine itself are not working as designed?

See:
https://social.technet.microsoft.com/Forums/lync/en-US/3d6921b3-e715-4717-b2c1-2ceb918ef37f/dism-importdefaultappassociations-runs-successfully-but-no-file-associations-are-changed?forum=win10itprosetup
and:
https://social.technet.microsoft.com/Forums/windows/en-US/d557f22d-6ac6-4139-b0f8-84e85c470d8c/modifng-default-apps-globally-for-all-new-users-on-a-windows-10-system?forum=win10itprosetup


The official document from MS, was updated more than two years ago:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/export-or-import-default-application-associations

Have you tried the same task to a build from two years ago, say Win10 1709 or 1607?:
https://docs.microsoft.com/en-us/archive/blogs/windowsinternals/windows-10-how-to-configure-file-associations-for-it-pros


I would suggest going via GPO route, I have seen some users using products such as KACE Desktop Authority, it's a software that runs scripts -AtUserLogon-, and it enforces file associations every time a user logs in.


Posted by: mwells 3 years ago
White Belt
0

Hello,

Thank you for the response. 

I have seen people suggest to use GPO in other threads that surround this but that is not an option here as we have been told not to touch or alter them. (If it matters, the only real applications that need to be changed is PDFs to Adobe and internet set to Chrome. )

The Windows version I'm working with is the newest, 20H2.

I think the XML file is working as intended. I used it on another VM and it imported successfully. The bat file could very well be incorrect, it's just the aforementioned, "dism /online /Import-DefaultAppAssociations:DefaultAppAssociations.xml"

I put the XML file on a network share and tried to call that in the cmd prompt but it errored out due to authentication issues. Is there a way I can call dism /online /Import-DefaultAppAssociations:"\\[network location]\DefaultAppAssociations.xml" but put in a username/password ? Or is that still the wrong direction for this?

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ