Give program all defaults for all users in command line

1

So my company has started deploying Windows 10 to all users, and we are still using Internet Explorer as our default browser, and Adobe Reader as our PDF handler.

Windows 10 comes out of the box with Edge as the default for websites and PDF documents.

I would like to run a batch or vb script as a task our deployment to change IE and Adobe Reader to have all of it's listed defaults for all users (to the same accomplishment as going in to Control Panel → Default Programs → Set Default Programs → Internet Explorer / Adobe Acrobat Reader → and clicking the "Set this program as default" action).

This needs to be accomplished without GPO (I have already addressed this with the GPO Admin and his manager, and they have deemed this will be easier to accomplish as part of the deployment rather than group policy, though I'm not convinced as such).

Any help provided would be much appreciate.

Joshua Parnell

Posted 2017-01-12T14:48:58.153

Reputation: 108

The simplest solution would be to set the Registry manually that the GP effects. This would be within HKEY_LOCAL_MACHINE\Software\Classes which applies to all users. Be sure you set the group policy that prevents them from changing the default programs. – Ramhound – 2017-01-12T14:56:26.683

You can also call DISM from within a batch script, use Export or Import Default Application Associations, after you generate the required XML default application association file.

– Ramhound – 2017-01-12T14:58:51.103

Using the DISM method on a live image, it worked with Adobe PDF, but Edge maintained it's defaults; I'm pretty sure part of the login process on each user is the "provisioning" of the Store apps, and Edge grabs this preference the first time a user logs in to a machine. The problem is I cannot find a difference between 2 machines (1 fresh user logged in, 1 with the defaults changed) between HKCR, HKCU, and HKLM (looking specifically at the HTTP protocol in each) - they all reference IE. I'll try DISM on our captured WIM to see if that makes a difference – Joshua Parnell – 2017-01-12T16:18:23.227

I am not 100% sure because I didn't try so far but I think the problem here might be that setting ie to open html (which is what is done via classes) is probably not enough. You would really need to set the default browser not the default file associations. DIsm should work though (also probably doesn't help but imo this is exactly what should be done via GPOs GPPs and never via scripting.) – Syberdoor – 2017-01-19T15:06:47.817

With a Group Policy Preference, they could set just the necessary reg keys only once (apply Item and do not reapply) and it could be changed but would initially still be according to standard (hence the name preference) but they probably know that so it seems they just love scripts that run for every profile... – Syberdoor – 2017-01-23T11:38:30.160

No answers