How to Remove Old Shortcut folder?

Got a problem you cannot solve? Try here.
seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

How to Remove Old Shortcut folder?

Postby seanmckenna » Fri Sep 08, 2006 11:20 am

In some of my previous installer setups (before we switched to InstallAware), shortcuts were left in the start menu after uninstallation. I am trying to make my installaware setup remove all these old shortcuts so I can start with a clean folder. My base shortcut folder is the same, but some of the sub-folders/links have changed and the old ones are remaining.

I have tried:

Recursively Delete Files $SHORTCUTFOLDER$

But this doesn't seem to work. Any ideas?

Another question: Do we have any control over how the shortcuts/sub-folders are ordered? sometimes it seems random and sometimes it is alphabetical. Thanks.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Sep 08, 2006 11:32 am

Unfortunately, you cannot set the ordering of shortcuts in Windows.

The Recursively Delete Files command will work as long as you have specified the correct target and wildcard mask for it. Please double-check - show a MessageBox at runtime if necessary to verify the paths. Remember that there are two folders - one for All Users, and one for the currently logged on user. You might be trying to delete one and icons might be remaining in the other.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Postby seanmckenna » Fri Sep 08, 2006 11:40 am

Ok, thanks. I'll try that.

seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Postby seanmckenna » Fri Sep 08, 2006 12:11 pm

I changed the code to this, and it worked.

Recursively Delete Files $SHORTCUTFOLDER$\\*.*

The only problem is that when my setup finished, I had NO shortcuts in the folder, it was empty.

I put this command towards the top of my script file. It comes before any Install Files OR Create Shortcut commands. Any idea why it would remove all of my shortcuts?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Sep 08, 2006 4:10 pm

Make sure the command executes before Apply Install. Apply Install will copy the actual files and create the actual shortcuts, so you should call it before it does all that.

What command were you using before?
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Postby seanmckenna » Fri Sep 08, 2006 4:19 pm

I'm not really sure what was going on here. I went into the add/remove programs and clicked remove, but instead of uninstalling, the setup went like it was Installing. Strange. I tried to remove as much as I could to manually uninstall everything. Now it seems to be alright.

I guess the remove files command wan't removing my shortcuts, they were never being installed. It was almost like my setup thought it was already installed, so it didn't do anything. I'm not sure what happened, but I think its ok now.

thanks.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 56 guests