Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Group Policy Question (Set System Variable)

Group Policy Question (Set System Variable)

Group Policy Question (Set System Variable)

So, I am not a group policy maven at all but I need to set a system environment variable and the value will be based on the username. For example:

Username / System Variable / Value
MJones / workstation / 1
BSmith / workstation / 2
CEdwards / workstation / 3

None of the users are, nor can they be, local admins and the value of the variable must be unique to each user. Finally, just to complicate matters, this is a 100% non-persistent VDI environment so when users log off all these types of settings are lost and must be recreated every time they log on to a new VDI session, hence the desire to do this via GPO.

I thought about just giving them all a simple batch file that they can run whenever they log on that uses the setx command ("setx workstation 1" replacing 1 with a different value for each user) but the command needs to be run in the context of an Admin in order for the variable to be set and therefore it doesn't recognize the username of the person that is actually logged onto the workstation plus they would need an admin password to run the file as.

Any thoughts on how best to accomplish this?

RE: Group Policy Question (Set System Variable)

Please disregard this question. I have got it all sorts of figured out.

RE: Group Policy Question (Set System Variable)

Please share what you did for anyone else looking to do the same, or red flag your own posts to clean up the forum.

I hope that helps.



No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at http://www.thespidersparlor.com/vbscript


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close