cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
botembao
Level 2

How to delete a startup shortcut created runtime

My application will create a shortcut and put it into Startup Folder in order to run it after windows start. The problem is that shortcut can't get deleted during uninstallation.

I added one entry into RemoveFile table like

FileKey = StartupShortcut1
Componment_ = 'main app.exe'
FileName = 'appname.lnk'
DirProperty = StartupFolder
InstallMode = 1

But it failed to delete startup shortcut. Can anyone help on this?

Thanks
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

One thing that stands out is that "InstallMode = 1" means "remove file during installation"; perhaps change to 2 to remove during uninstallation?

(Assuming you're dynamically creating the shortcut somehow, and not using the Shortcut table.)
0 Kudos