Microsoft’s official Group Policy blog
There was a great question in the blog comments, I’m going to post the answer up here because I think the answer is cool.
Can a location (UNC) be set using both an environmental variable and a static entry?
I'll explain by example. Let's say that there are shares named %username%Folder (FredFolder, SallyFolder, EricFolder, etc.). Is there a way to set this as the location in a single GPP item for all users? I've already determined that \\server\Users\%logonuser%Folder won't work. Is there some syntax that can make this happen?
In fact, that is how you do it. The issue here is not of syntax, but more likely of placement. A potential problem in the above example is if the preference item was created under Computer Configuration; it should have been under User Configuration to be properly resolved.
Here are some examples:
The XML for this item is below: copy/paste that into an XML document (notepad file, save as .xml), drag that file into your Preference Folder Item’s window and you will have a preference item that updates a folder called “SimpleFolder” on every user’s desktop. Open up the item to verify this!
This configuration creates a folder on the Desktop using the logged on user’s name + the string “worksWell”. Here’s the XML:
To access these environment variables, just press F3 and you’ll see a window come up with all of your options. Remember to check the “Resolve variable” box at the bottom of the dialog.
To read more about creating folder preference items, read this TechNet article.
Hope this helps,
LiliaG, Group Policy PM
Mark Gray, Group Policy PM and RajiveK, Group Policy Software Developer Engineer