Loading
Desktop Shortcut - how to make so it can not be deleted

I have created a msi that will install a  shortcut that must be on the desktop at all times.  I have included a custom action that creates a scheduled task to check for the existence and if not found will reinstall it.  This will run every 15 minutes.  I would prefer to have this shortcut not be able to be deleted by any user on the device rather than have the task run.

Does anyone know a way to make this shortcut stick and not be deleted?  I have played around with permission on the .lnk file but so far I can still delete it.

Thanks for any ideas!


  • Thank you for this information. I will give it a try.
    Selected as Best
  • moconn (Flexera Software)

    Hi @eimhoff  -

    You can move the shortcuts from the individual user's Desktop folder to the Public Desktop folder.

    I tried this with just creating a shortcut to the Windows Calculator, then I moved it to C:\Users\Public\Desktop folder. While logged into my machine as a standard user, when I choose to delete the shortcut it requires that the user have Administrative privileges' before they can complete the procedure:

    Desktop Admin Warning.png

    In the InstallShield Editor within AdminStudio, you can open your MSI project or MST (transform) project, go to (1) Shortcuts and then right-click (2) on the Shortcuts top root node in the middle frame, and under Show Folder choose (3) [ALLUSERSPROFILE]. Then, create a new directory called "Desktop" underneath that folder and put the shortcut there. like I've done with Notepad++:

    AllUsersProfile.png

    With the shortcut under this Public Desktop folder, when it gets installed it shows up under C:\Users\Public\Desktop:

    Moved Shortcut and Result.png

    This leads to the shortcut residing on the Public Desktop directory, which will block any user without admin privileges' to be able to delete it successfully.

    Expand Post
    • Thank you for this information. I will give it a try.
      Selected as Best

Related  Product Forums


                     → Flexera One



                      → Snow Atlas



                      → FlexNet Manager



                      → Snow License Manager



                       → App Broker


       Need help finding an answer?


        Ask a Question →


Loading
Desktop Shortcut - how to make so it can not be deleted