Alaska Software Inc. - Windows Server 2016 - Remote Desktop - user account environment settings problem
Username: Password:
AuthorTopic: Windows Server 2016 - Remote Desktop - user account environment settings problem
Chris Carmac Windows Server 2016 - Remote Desktop - user account environment settings problem
on Tue, 17 Jan 2017 13:28:25 -0500
Everyone/anyone,

I have a weird issue I was hoping someone can help me with.  The problem 
has nothing to do with Xbase++; it's an issue with Microsoft Windows 
Server 2016, which is why I'm posting it in the "generic" newsgroup.

For years now, we have deployed our Xbase++ applicaions on Windows 
servers running terminal services/remote desktop. On the user account 
configuration screen within Windows Server (all versions), there is a 
tab named "Environment" that allows you to set a program and start path 
that launches automatically whenever the user logs in.  When the user 
exits out of that program, they are automatically logged off the server. 
  This feature works beautifully for our application deployment, because 
we can set our Xbase++ application to start automatically when the user 
logs in, and it prevents them from deleting/changing anything within the 
OS because they can't get to the desktop.

I have attached a screen shot of the settings I am referring to.

This feature has always worked on Windows Server 2003, 2008, and 2012. 
However, I recently ordered a new Dell T130 server for my office with 
Windows Server 2016 standard installed on it, and I can't get the user 
environment settings to work.  I've spent hours messing with this, and 
even called in a hardware/networking consultant who spent over 4 hours 
looking at it, and he couldn't get it to work either.

I have the Remote Desktop role installed on the server - Remote Desktop 
Connection Broker, Remote Desktop Session Host, and Remote Desktop Web 
Access roles are all enabled.  The server is joined to a domain, and I 
have a Remote Desktop server collection defined.  When I log on to the 
server remotely using the Microsoft RDP/RDS client, the settings on the 
user account environment tab are ignored. The session logs the user onto 
a desktop, something I don't want to happen.

Here are some things I tried which haven't helped...

1. Made the user a member of the "administrators" group.
2. Added my application to the published remote apps list
3. Enabled the "Allow remote start of unlisted programs" in the Computer 
Configuration/Administrative Templates/Windows Components/Remote Desktop 
Services/Remote Desktop Session Host/Connections group policy
4. Disabled the "Always show desktop on connection" in the Computer 
Configuration/Administrative Templates/Windows Components/Remote Desktop 
Services/Remote Desktop Session Host/Remote Session Environment group policy
5. Installed the "Windows Server Essentials Experience" on the server
6. Logged onto the server with a local user instead of a domain user
7. Uninstalled Remote Desktop Services roles and reinstalled them

Has anyone else run into this problem?  I'm trying to figure out whether 
this issue is isolated to my particular server, or if Microsoft somehow 
broke the user account environment settings in Windows Server 2016.

If anyone is using Windows Server 2016, please post a response here and 
let me know whether or not the user account environment tab settings 
work for you or not.

Thanks!

Chris Carmac


RdpEnvironment.jpg
Chris Carmac Re: Windows Server 2016 - Remote Desktop - user account environment settings problem
on Wed, 18 Jan 2017 10:58:14 -0500
I ran across the following article in one of the “Windows Server 2016 
General” forum on the Microsoft TechNet site, which described an issue 
similar to the one I am having on my new Dell T-130 server:

https://social.technet.microsoft.com/Forums/en-US/ca448e78-0105-4cd5-ae75-5552daa3f80d/remote-desktop-homedrive-not-being-mapped?forum=ws2016

One of the responses to the post suggested creating the following 
registry key on the Remote Desktop Server:

HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\ 
fQueryUserConfigFromDC          REG_DWORD          0x00000001

Just for kicks I created that registry key on the Dell T-130 server, and 
it fixed the problem!  The program defined on the “Environment” tab of 
the user account launches automatically now, and when the user logs out 
of the program they are automatically logged off the server, as 
expected.  Everything appears to be working now.

Interestingly, creating the registry key did not solve the problem 
described in the post I found in the TechNet forum.  I’m not sure why it 
worked for me and not for them.  In any case, I’m ready to claim victory 
and move on!

I wanted to post the solution here, in case anyone else runs into this 
problem.

Chris


On 1/17/2017 1:28 PM, Chris Carmac wrote:
> Everyone/anyone,
>
> I have a weird issue I was hoping someone can help me with.  The problem
> has nothing to do with Xbase++; it's an issue with Microsoft Windows
> Server 2016, which is why I'm posting it in the "generic" newsgroup.
>
> For years now, we have deployed our Xbase++ applicaions on Windows
> servers running terminal services/remote desktop. On the user account
> configuration screen within Windows Server (all versions), there is a
> tab named "Environment" that allows you to set a program and start path
> that launches automatically whenever the user logs in.  When the user
> exits out of that program, they are automatically logged off the server.
>   This feature works beautifully for our application deployment, because
> we can set our Xbase++ application to start automatically when the user
> logs in, and it prevents them from deleting/changing anything within the
> OS because they can't get to the desktop.
>
> I have attached a screen shot of the settings I am referring to.
>
> This feature has always worked on Windows Server 2003, 2008, and 2012.
> However, I recently ordered a new Dell T130 server for my office with
> Windows Server 2016 standard installed on it, and I can't get the user
> environment settings to work.  I've spent hours messing with this, and
> even called in a hardware/networking consultant who spent over 4 hours
> looking at it, and he couldn't get it to work either.
>
> I have the Remote Desktop role installed on the server - Remote Desktop
> Connection Broker, Remote Desktop Session Host, and Remote Desktop Web
> Access roles are all enabled.  The server is joined to a domain, and I
> have a Remote Desktop server collection defined.  When I log on to the
> server remotely using the Microsoft RDP/RDS client, the settings on the
> user account environment tab are ignored. The session logs the user onto
> a desktop, something I don't want to happen.
>
> Here are some things I tried which haven't helped...
>
> 1. Made the user a member of the "administrators" group.
> 2. Added my application to the published remote apps list
> 3. Enabled the "Allow remote start of unlisted programs" in the Computer
> Configuration/Administrative Templates/Windows Components/Remote Desktop
> Services/Remote Desktop Session Host/Connections group policy
> 4. Disabled the "Always show desktop on connection" in the Computer
> Configuration/Administrative Templates/Windows Components/Remote Desktop
> Services/Remote Desktop Session Host/Remote Session Environment group
> policy
> 5. Installed the "Windows Server Essentials Experience" on the server
> 6. Logged onto the server with a local user instead of a domain user
> 7. Uninstalled Remote Desktop Services roles and reinstalled them
>
> Has anyone else run into this problem?  I'm trying to figure out whether
> this issue is isolated to my particular server, or if Microsoft somehow
> broke the user account environment settings in Windows Server 2016.
>
> If anyone is using Windows Server 2016, please post a response here and
> let me know whether or not the user account environment tab settings
> work for you or not.
>
> Thanks!
>
> Chris Carmac