File Removal Not Removing Desktop Shortcut - Advanced Installer Community
Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

File Removal Not Removing Desktop Shortcut

I have a file removal operation under the Desktop folder to remove a shortcut with the ".appref-ms" extention so that it is removed on Component install, but when the installer runs, it doesn't get removed. I don't see any errors in the log. I do see that it searcher for the current user and also under C:\Users\Public\Desktop\. Where is this file removal for "Desktop" searching; under current user or under the public folder? If this "Desktop" file removal is searching under the public folder, how can I make it search for all or specific users?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: File Removal Not Removing Desktop Shortcut

Hi,

I tested the scenario and it worked as expected to me. Please note that a shortcut has the ".lnk" extension even if it is not shown, so you may need to add it at the end of the name of your shortcut in the "File Removal" dialog.

The "Desktop" folder from the "Files and Folders" page points to the following path: C:\Users\<username>\Desktop

You can see a list of all those folders' paths in the "Paths of the folders in the "Files and Folders" Page" article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

Re: File Removal Not Removing Desktop Shortcut

This is a shortcut for a ClickOnce application so it doesn't have the ".lnk" extension. I tried using that extension, but it didn't work. My understanding is that the ".appref-ms" points to the applications URL to launch it.

Image
Last edited by Collins on Wed Jul 12, 2017 1:35 pm, edited 1 time in total.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: File Removal Not Removing Desktop Shortcut

Hi,

I'm not sure why this happens. Can you please try to isolate the behavior in a buildable sample (.aip + its referenced files) and send it to support at advancedinstaller dot com, so I can test it and try to reproduce the issue?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 142
Joined: Wed Oct 12, 2016 2:57 pm

Re: File Removal Not Removing Desktop Shortcut

Thank you, I just emailed all the files required.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: File Removal Not Removing Desktop Shortcut

Hi,

Thank you for sending the necessary files. I tested them and I was able to reproduce the behavior.

This happens because the "DesktopFolder" property points to the public Desktop folder when the installation type is per-machine and to the current user's Desktop folder when the installation type is per-user. Our user guide is incomplete, but we we will update it with this information.

In order to point to the current user's Desktop folder from a per-machine package, you can create a property based folder that will be set to the following path through a "Set installer property" custom action: [WindowsVolume]Users\[LogonUser]\Desktop

Let me know if you have any questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
audiodino
Posts: 3
Joined: Thu Apr 23, 2020 4:22 pm

Re: File Removal Not Removing Desktop Shortcut

I too are having the same problem.

Image

Can anyone help me out? a visual demo or instruction list would be great as I'm sort of new'ish to the software. thanks
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: File Removal Not Removing Desktop Shortcut

Hello,

I have answered your forum thread here:

viewtopic.php?f=2&t=45274&p=115902#p115902

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”