none
GPO Preference Shortcuts "Remove this item when it is no longer applied" behavior issues (0x80070002)

    Question

  • 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.

    Wednesday, November 23, 2016 6:22 PM

All replies

  • Hi,

    Please have a try to run gpupdate /force command and see if the shortcut appears or not.
    In my experience, this issue may happen when GPO is trying to create the shortcut before the drive is connected and Windows can’t create new shortcuts to locations which is not connected then.
    In this case, I would suggest that you could have a try as below:
    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
    Best regards,
    Wendy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Friday, November 25, 2016 1:52 AM
    Moderator
  • Hi,

    I am checking how the issue going, if you still have any questions, please feel free to contact us.

    And if the replies as above are helpful, we would appreciate you to mark them as answers, and if you resolve it using your own solution, please share your experience and solution here. It will be greatly helpful to others who have the same question.

    Appreciate for your feedback.

    Best regards,

    Wendy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, November 29, 2016 4:46 AM
    Moderator
  • Greetings!

    Unticking "Remove this item when it is no longer applied" resolved this issue. However, I appreciate the list of possible solutions you have provided. I sincerely hope that this thread will be found by other IT professionals and administrators as beneficial for next steps troubleshooting for those who have more time and opportunity than I did for troubleshooting this issue.

    Thank you so much Wendy, and happy holidays!

    Joshua

    Saturday, December 17, 2016 3:16 AM
  • Hi,
    Thank you for sharing the feedback, and if the replies as above are helpful, we would appreciate you to mark them as answers, it will be greatly helpful to others who have the same question.
    Best regards,
    Wendy

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, December 19, 2016 1:56 AM
    Moderator