Setting Default App Assocations as a "Post-Install" Task
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?
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
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?
The official document from MS, was updated more than two years ago:
Have you tried the same task to a build from two years ago, say Win10 1709 or 1607?:
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.
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?