Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Policy Question (Set System Variable)

Status
Not open for further replies.

cabraun

MIS
Feb 27, 2002
135
0
0
US
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
etc...

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?

 
Please disregard this question. I have got it all sorts of figured out.
 
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.

Regards,

Mark

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

Check out my scripting solutions at
Work SMARTER not HARDER.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top