eimhoff
Flexera beginner

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

Jump to solution

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!

0 Kudos
1 Solution
eimhoff
Flexera beginner
Thank you for this information. I will give it a try.

View solution in original post

2 Replies
moconn
Moderator Moderator
Moderator

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++:

Add ALLUSERSPROFILEAdd ALLUSERSPROFILE

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

Moved Shortcut to Public Desktop and Result after InstallMoved Shortcut to Public Desktop and Result after Install

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.

Expert Flexeran on AdminStudio, Workflow Manager, and Software Vulnerability Manager / Research
If I've answered your question, please mark my response as "Accept as Solution" to help others find answers. Thanks!
eimhoff
Flexera beginner
Thank you for this information. I will give it a try.

View solution in original post