Using Environment Variables in an AD Profile Path

0

When I set a profile in an AD object, I need to use a predefined environment variable, %BUILDID%. So the path would be \SVR-STAFF\Profiles$\%BUILDID%\Administrator.v2 ...

But the path doesn't work. If you put it into the run box or explorer box, it works perfect and if you change the AD profile path to \SVR-STAFF\Profiles$\Windows7\Administrator.v2 it works perfect. The path should resolve to this on some of my machines, depending on the variable.

Why isn't this working and how can it work?

Thanks Ed

EdG

Posted 2014-07-06T12:44:50.677

Reputation: 616

I've never heard of %BUILDID%. Is that a custom variable? If so, I'm fairly certain that it can't be used as it won't be recognized by Windows as a valid variable for the profile path. – joeqwerty – 2014-07-06T13:40:35.113

It is a custom variable. It has been used at a site I used to work at, but I have no access to it anymore. Surely because it has been declared, it can be used? – EdG – 2014-07-06T13:49:26.293

This would suggest it should work, but I can't get it to – EdG – 2014-07-06T13:55:18.343

Answers

0

Found the answer. When creating the variable in a Group Policy, make sure you say 'Create' and not 'Update'. The variable is then held through reboots, and the PC does not have to wait for the gpupdate to run.

EdG

Posted 2014-07-06T12:44:50.677

Reputation: 616