GPO Preferences Shortcuts: Remove this item when it is no longer applied = 0x80070002

Cerulean

[H]F Junkie
Joined
Jul 27, 2006
Messages
9,476
Greetings!



The problem:
GPO-pushed "%UserProfile%\Desktop" shortcut disappears when executed, Event Viewer indicates a 0x80070002 error. Program does launch. This problem prevents the user from launching the program again, or in some cases we have received reports that the shortcut disappears before they're able to double-click on the shortcut.



Error in Event Viewer:
"
The computer '<Name> preference item in the '<Policy> {GUID}' Group Policy object did not apply because it failed with error code '0x80070002 The system cannot find the file specified.' This error was suppressed.
"



Technical information about GPO setup:
We have a GPO that applies User Configuration only, linked to contoso.local (root), and has Authenticated Users in the security filtering. The only setting in this GPO, for testing purposes, is a Shortcut GPO Preference with this configuration:

"
Action: Replace
Target type: File system object
Shortcut path: %DesktopDir%\Program Launcher GPO
Target path: Z:\program.exe
Arguments: Z:\program.exe
Start in: Z:\
Icon path: \\contoso.local\netlogon\program.ico

Icon index: 0 (default)
Shortcut key: None (default)
Comment: Program launcher
Run: Normal window (default)

Stop processing items on this extension if an error occurs on this item: No (default)
Run in logged-on user's security context (user policy option): Yes (default)
Remove this item when it is no longer applied: Yes (sets Action to Replace if 'Yes')
Apply once and do not reapply: No (default)
"

The Target path and Arguments fields are correct. For whatever reason, the program must be launched as "Z:\program.exe Z:\program.exe" to fix certain problems (which can also be negated via Program Compatibility set to Windows XP SP3 mode).

Z:\ is a mapped network drive and does exist and is accessible when the symptom of the problem is experienced. The user is able to go to Z:\ and manually launch program.exe.
 
Last edited:
Unticking "Remove this item when it is no longer applied" resolved this issue.

Microsoft provided some suggestions at my Technet thread that I didn't have the opportunity or leisure to try:
"
1. Create the shortcut using UNC-path
2. Create the drives and shortcuts using logonscript
3. Create a scheduled task using GPP to run GPupdate after user logon or use logonscript to run GPupdate
4. enable the “wait for network before logon” option: https://technet.microsoft.com/en-us/library/gg486839.aspx
"
 
Back
Top