0

We have installed a Windows Server 2016 Remote Desktop Session Host (actually 1 broker server with 2 session host servers, all Windows Server 2016). Users log in with roaming profiles (stored on the broker server), local profiles are deleted when users log off.

Each time the users log in and try to open a website, they have to choose wich browser they want to use: Google Chrome or IE. The option "always use this program..." is checked. While in their current session, it is not asked any more, but when they logoff and they log back in, they get the question again.

Any one knows how to fix this? This setting should be stored in the users' registry not?

Thanks, Michiel.

Mickeybyte
  • 81
  • 2
  • 2
  • 9

3 Answers3

1

The four FileExts Reg keys provided Esa Jokinen work (.htm, .html, etc), but the other 3 dont (http, https, ftp).

URLAssociations\http and URLAssociations\https dont work because of Microsoft creating the Hash value in these keys unique to the server when the user sets them, so when the user roams to a different server Windows ignores the key and shows the "Choose program" dialog box instead. This is really annoying to the user. But i did find a way to fix this for my users.

To get around this, i've used the SetDefaultBrowser applet created Christoph Kolbicz located here: https://kolbi.cz/blog/2017/11/10/setdefaultbrowser-set-the-default-browser-per-user-on-windows-10-and-server-2016-build-1607/

I simply set a GPO to run the applet when the users login, and it sets Default browser in the Session to Chrome. (SetDefaultBrowser.exe Chrome)

Liberta_DC
  • 11
  • 1
0

Umm.... how about "install mode"?

https://itproguru.com/expert/2011/03/remote-desktop-services-how-to-change-settings-for-all-users/

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/change-user

basically... run the following from a command prompt:

change user /install

Make your changes that you'd like to be default, then run:

change user /execute

No unnecessary GPO... No regedits...

Novox
  • 474
  • 1
  • 9
  • 27
0

The information of the default browser is stored in following registry keys in HKCU or HKEY_CURRENT_USER, which is actually a pointer to HKEY_USERS\ Security ID (SID).

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\UserChoice\Progid
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice\Progid
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xht\UserChoice\Progid
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.Xhtm\UserChoice\Progid

HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice\Progid
HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice\Progid
HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice\Progid

They are REG_SZ values with associated default browser: FirefoxURL / ChromeHTML / IE.HTTP etc.

A new HKEY_CURRENT_USER subtree is created each time a user logs on. The data for the subtree comes from the profile of the current user. If no profile is available, the subtree is built from the user profile settings established for a default user, which are stored in %SystemDrive%\Users\Default\Ntuser.dat.

So, HKCU is stored in user's profile: by default these settings should follow the user as local %USERPROFILE% gets synchronized with the roaming profile at logoff, if you have deployed roaming user profiles correctly.

However, for reducing the size of roaming profiles there are options for limiting the profile size with Profile Quotas and Excluded Folders.

You should check that you don't accidentally exclude ntuser.dat in

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"ExcludeProfileDirs"="AppData\\Local;AppData\\LocalLow;$Recycle.Bin;OneDrive;Work Folders"

Then, look inside User Configuration\Administrative Templates\System\User Profiles on the GPOs applied to the roaming profile users:

  • Exclude directories in roaming profile

    This policy setting lets you exclude folders that are normally included in the user's profile. As a result, these folders do not need to be stored by the network server on which the profile resides and do not follow users to other computers.

    Note: When excluding content from the profile you should try to exclude the narrowest set of data that will address your needs. For example, if there is one application with data that should not be roamed then add only that application's specific folder under the AppData\Roaming folder rather than all of the AppData\Roaming folder to the exclusion list.

  • Limit profile size

    This policy setting sets the maximum size of each user profile and determines the system's response when a user profile reaches the maximum size. This policy setting affects both local and roaming profiles.

    If you enable this policy setting, you can:

    • Set a maximum permitted user profile size.
    • Determine whether the registry files are included in the calculation of the profile size.

Check that these settings are rational and not limiting the synchronization of ntuser.dat.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
  • It seems to be solved by disabling the GPO setting to delete roaming profiles at logoff. This doesn't realy sounds logical to me, because I would suspect this "default browser" setting to be in the current users settings and thus save in the roaming profile. – Mickeybyte May 02 '17 at 18:32