1

I am trying to create Desktop shortcut on Win 10 clients on 2012 Domain via GPO. The application is located on a mapped network drive:

Z:\application\app.exe

If I try to create shell shortcuts all works fine (to test if GPO works), but targeting mapped drive app doesn't work whatever I did.

Any ideas?

UPDATE:

The app works correctly when started, directly or via manually added shortcut.

I tried GPO adding test shell shortcut and that worked fine.

I replicated normal desktop shortcut to an app.exe on shared drive, via GPO, but that one doesn't get created whatever I do.

  • 1
    Please clarify what works and what doesn't. Does the app itself work correctly, started from Z:\? – Lenniey May 15 at 14:20
  • I updated the Q! – mrmut May 15 at 18:54
2

To achieve maximum success rate, I recommend you to create the Shorcut in the "User" part of the GPO (if it's not already the case), and to use the full path instead of the drive letter.

For example, if Z: is mapped to \\fs1\Share\Folder then add this full path as your shortcut target \\fs1\Share\Folder\app.exe instead of z:\myapp.exe

The problem here is that you can experience timing problems: if the shortcut preference is processed before the Z:\ drive connnection, it will fail.

  • 1
    The shortcut is under user, tho full path didn't come to my mind. Not sure if the program will work that way, tho.. Will have to check and test. As for timing, you might be right. I will set this policy process the last. (Tho I did run RSOP and all was fine.) Will ping back on this! – mrmut May 15 at 19:25
  • 2
    I did this, and it worked. The icon was created without issues, and the application works. Apparently, it doesn't depend on drive letter but connects directly to server, and it turns out I can even remove shared drive whatsoever. – mrmut May 16 at 7:38
0

This is a common problem if the drive is only mapped for user accounts but you are trying to deploy the shortcut via computer policy, which doesn't have an existing mapping.

The easiest fix is to use a shell object type for the deployed shortcut, but you can also create per use shortcuts, map the drive under the system account, etc.

  • The shortcut is under user. How would I create shortcut under a shell object? Thanks. – mrmut May 15 at 19:23
0

Do you map a drive through GPO as well? If yes, GPO is trying to create a shortcut before a mapped drive is created (target doesn't exist yet so the shortcut is not created). I would do this:

  1. Create a shortcut manually

  2. Copy that shortcut to NETLOGON share on a DC

  3. Create a GPO preference to create a File ... example:

enter image description here

REMARK: For whatever reason, you can not define target as %HOMEDRIVE%\Users\Public\Desktop

But, if you really need to use variables for paths then create GPO preference like this:

enter image description here

and then you create GPO preference Shortcut to point to shortcut in %ProgramFiles% :-)

  • Wow... :-) Thanks. Will try tomorrow! I will first try to play with processing time, and if ti won't work, with this. – mrmut May 15 at 19:33
  • 2
    If I was on your place I would try what "Swisstone" has suggested if you don't need mapped drive for anything else but that stupid shortcut. Mapped drives are magnets for ransomware and bad user behavior if the security is not setup the right way. – toofat May 15 at 19:43
  • 1
    One more thing, example here is created under Computers GPO preference. When creating under Users GPO preference, remember that the target must be dir user has write access to (which is not Public\Desktop or %ProgramFiles%) – toofat May 15 at 19:53
  • 1
    I decided to skip this dues to complexity (more things to fail) and the fact the Swisstone solution worked. It is, however, a compelling solution for situations where actual shortcut is needed. I am almost sorry I haven't implemented this! – mrmut May 16 at 7:41
  • 1
    Ohhh, I use this method for our "Support accounts". I've created custom shortcuts for CMD and PowerShell (with "RunAsAdmin" already selected) and custom RDP file (that doesn't redirect audio and printers because that is a big fail in my line of work). Then I create those on the desktop of our "Support team" when they log in on users computers. But as I have stated previously, Swisstones method is better if app works with UNC paths (some don't and they require mapped drives) and if more than 256 characters in path is not the issue. It's safer solution then mapped drive :-) – toofat May 16 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.