Hello,
I'm trying to create some shortcuts to some executables with Group Policy Preferences (GPP) for my users. As I understand, you can use two types of variables when specifying the target path for a shortcut with GPP:
- Windows Environment Variables (e.g., those seen when typing set from Command Prompt)
- Preference Process Variables (e.g., those seen when pressing F3 to bring up the Select a Variable screen from the GPP shortcut creation screen)
However, I can't get any of the Windows Environment Variables to work. E.g., while I can use %SystemDir% (which is a Preference Process Variable), I can't use %SystemRoot% which is a Windows Environment Variable.
Sure, I can just use the Preference Process Variables (e.g., %WindowsDir%) or hardcoded paths (e.g., C:\Windows\...), but that's not very flexible for different configurations on the client side and I want to use other Windows Environment Variables (e.g., %CommonProgramFiles(x86)%, %ProgramFiles(x86)%), etc) that aren't available as Preference Process Variables.
Any ideas whether you can actually use Windows Environment Variables? In the System Event Log, I can clearly see an error logged when trying to use a target path with Windows Environment Variables:
The user 'My Shortcut' preference item in the 'My Group Policy {FB48D31D-C685-4D3F-8CE9-BE87350588FA}' Group Policy object did not apply because it failed with error code '0x80070002 The system cannot find the file specified.' This error was suppressed.I've also tried using unresolved variables (e.g., with the angled brackets inside the % characters, %<SystemRoot%>, by unticking "Resolve Variable" in F3 (Select a Variable) screen), but no luck...
I am creating the Group Policy Objects from a Windows 7 x64 workstation with a Central Store and the target clients being managed are Windows Server 2008 x64 (Terminal Servers actually) if any of that matters.
Cheers.