Trying to create a GPO shortcut to local app data directory

environment-variablesgroup-policyshortcutwindows 7windows-server-2008-r2

We have a lockdown browser application that was installed on all of our students' laptops, but it was installed to the local app data of the user that performed the install. Therefore, none of our students see the application, because they are all under my user and my boss's user. I have tried writing a GPO shortcut policy to create a desktop shortcut that points to the path "%localappdata%\NWEA\Lockdown Browser\Lockdown Browser.exe" and "C:\%localappdata%\NWEA\Lockdown Browser\Lockdown Browser.exe". Is there something you need to do specifically when the path contains a variable like that?

Best Answer

Finally, I've found out the source of your problem

It is not about %localappdata%, it is about the target Location since you are using the predefined Variables (Locations) in GP Preferences then make sure that the environment variable exist on your Client device. As far as I can see the Variables are not defined by default.

Either set them on your Clients or use a full path including your %localappdata% instead.

In your case the system tries to create a shortcut on %CommonStartMenuDir% while this variable is unknown to the System.

Hope this helped you out of your misery !


Have you made sure sure that the NTFS rights are set correctly on the executable ? Probably set NTFS security rights on "YourStudentGroup" or "Authenticated Users" to "Read&Execute". Furthermore if it is targeting to %localappdata% it will always search for the target in the current active profile, aren't you trying to open an application from an other users profile ?


Take a look on the following img for my Test GPO. Probably your problem is not the %localappdata% path, I guess in your GPO you've got %DesktopDir% as filepath. This environment variable however is not defined so use "%userprofile%\desktop" instead

(cannot post imgs yet so here's a link) http://imageshack.us/a/img34/7812/jzs.png


Furthermore you should also try to create the link manually on a test system, if the target can't be found no shortcut will be created at all. I've experienced that due my tests for you yesterday.