0

(Windows 2012r2 Server)

I am currently in a domain environment and our Homepaths are controlled via Active Directory. For a special app when a user logs into RDP the app only runs if the users HOMEPATH is "C:\Users\ID"

Active Directory is currently forcing the HOMEPATH to be something else. I don't want to change on the active directory side, as it involves a lot of users.

I wanted to see if there was someway to control this via GPO, start up script for the users that log in via RDP.

Any Assistance would be greatly appreciated

thanks

1 Answer 1

0

Given that HOMEPATH is just an environmental variable, you can simply create a .cmd file that says

set HOMEPATH=C:\Users\ID"

And the homepath changes. Now, this only becomes affective for the duration of the cmd session, so you would need to use setx to push it to the users parameters. But that made me thinking, if this program always expects this setting to be true, the most simple solution is to simply create a launcher for this program that first changes the HOMEPATH setting, then starts the program and once the program closes, it automatically reverts back.

Your script would look like this:

set HOMEPATH=C:\Users\ID"
start "C:\MyProgram\program.exe"

No need to change anything to the environment any more, people just have to start your .cmd file instead of the .exe file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .