We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

BenKell
Posts: 11
Joined: Tue Aug 07, 2012 11:07 pm

Deleting Old Desktop Shortcut

Good Afternoon -

I'm deploying an internal application update this weekend and using Advanced Installer to build the MSI.

The application is only an EXE file in the application folder and a shortcut to it on the Desktop. That part is easy to set up. The issue is another step that needs to be performed.

Previous versions did not have installers created for them. Techs just copied the EXE manually and manually created desktop shortcuts. Therefore, each user has an "applicationname.lnk" in their local desktop - not just the Default or Public Desktop. Also, the new MSI will be deployed via SCCM so may be run when a user is not logged in meaning that some environment variables may not work.

So... how can I create a custom command inside the installer to remove the previous version's desktop shortcut from their profile's Desktop folder?

Thanks!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Deleting Old Desktop Shortcut

Hello,

Due to log on limitation I'm afraid that we don't have a predefined support for this. If the related user will be logged in, then you could use a file removal operation.

In order to achieve this you should create a custom action which will iterate all system users, find their desktop folders and delete the related shortcut files. Also, the custom action should be scheduled before "Install Execution Stage" -> "Add Resources" action group and should run as deferred with no impersonation.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”