Update, For some reason the variable %localappdata% gives problems. The GPO is linked to the computerobject in a OU. But when I link it to a user I get a permission error. Changing the path from %localappdata% to C:\Users\tim_hui\AppData\Local resolves the issue but the GPO needs to apply to all my users so I need that variable working.
Can't create a shortcut using a GPO.
Hello everyone I'm trying to create a shortcut using a GPO. For some reason I get the 0x80070002 error code when applying my GPO.
My goal is to create a shortcut named Mailspring in %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs
I added the gpresult /h and a screenshot of my gpo.
I configured this in my GPO:
name: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Mailspring
target type: File system object
Location: Specify full path
Target path: %LocalAppData%\Mailspring\mailspring.exe
When I use this GPO and change the target type to URL it does work.
When I change %ALLUSERSPROFILE% to C:\ProgramData and %LocalAppData% to C:\Users\tim_hui it still does not work.
Does anyone have experience with this problem? I hope I gave enough information to work with I am willing to provide more when necessary.
Thanks in advance,
Regards Daniël
2 answers
Sort by: Most helpful
-
-
Limitless Technology 39,351 Reputation points
2021-09-14T10:11:25.767+00:00 Hello DanilSchiffers,
This 0x80070002 error code appears due to corrupted apps and when some files are missing even after the update and when files aren't extracted properly. and even due to time date issues and registry issues.
To rectify it do try the following methods
- delete software distribution folders
- Check for your date and time
- Try windows update troubleshooter for GPO
- Try modifying Registry Editor
If the problem persists do follow the below link for advanced methods of Group Policy, Shortcut Extensions
Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )