4 Replies Latest reply on Mar 19, 2018 3:15 AM by chris.toseland

    desktop shortcut of Target type:Local Drive

    chris.toseland Rookie

      Hi,

       

      I am trying to recreate a customised desktop to encourage one of our schools to adopt our standard OS image and Ivanti management and one of their requirements is to have 2 desktop shortcuts that map to local drives (D: & E:).

      It would appear that EM shortcut manager does not allow links of Target type: Local Drive, I can use the import wizard but the icon is incorrect and when I try to edit I get the error "Please enter a valid path". I suppose I can use a file copy to copy the link from a resource share to the user desktop but would prefer to use a standard method across this policy.

      Could anyone advise if this is a known issue as I would expect this to work as it is an allowable action within the Windows GUI.

       

      Thanks


      Chris

        • 1. Re: desktop shortcut of Target type:Local Drive
          Landon Winburn ITSMMVPGroup

          I usually advise NOT to use create shortcut actions. The windows API to create a shortcut is slow. Its usually easier and faster to just use a copy file action to copy a pre-created shortcut on a share into the users profile. If you do this the shortcut can be any type.

          • 2. Re: desktop shortcut of Target type:Local Drive
            randyb1 SupportEmployee

            The native shortcut action is also limited in that it will only create LNK shortcuts, not URL shortcuts.  If you really don't want to do the copy action, try a VBscript action.  Examples:

             

            --------------------------

             

            Set WshShell = CreateObject("WScript.Shell")

            Set objShortcutUrl = WshShell.CreateShortcut("c:\users\username\Desktop\Bing.url")

            objShortcutUrl.TargetPath = "http://www.bing.com"

            objShortcutUrl.Save

             

            Set WshShell = CreateObject("WScript.Shell")

            Set objShortcutUrl = WshShell.CreateShortcut("c:\users\username\Desktop\CDrive.lnk")

            objShortcutUrl.TargetPath = "D:\"

            objShortcutUrl.Save

             

            --------------------------

             

            You may need to incorporate an environment variable to properly reference the Desktop folder being used.

            • 3. Re: desktop shortcut of Target type:Local Drive
              Landon Winburn ITSMMVPGroup

              With environment variable...

               

              Set WshShell = CreateObject("WScript.Shell")

              Set objShortcutUrl = WshShell.CreateShortcut(WshShell.ExpandEnvironmentStrings("%userprofile%) & "\Desktop\CDrive.lnk")

              objShortcutUrl.TargetPath = "D:\"

              objShortcutUrl.Save

               

              So custom actions are also slower than just a simple file copy and you also can't debug them using EMMon like you can copy file actions.

              • 4. Re: desktop shortcut of Target type:Local Drive
                chris.toseland Rookie

                Thanks for the information guys, that is all very useful.

                I'll fall back to the file copy for all of the shortcuts as you point out I am able to see a visible delay during logon for users who have this policy applied.


                Regards,

                 

                Chris