Page 1 of 1

How to Remove Old Shortcut folder?

Posted: Fri Sep 08, 2006 11:20 am
by seanmckenna
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.

Posted: Fri Sep 08, 2006 11:32 am
by MichaelNesmith
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.

Posted: Fri Sep 08, 2006 11:40 am
by seanmckenna
Ok, thanks. I'll try that.

Posted: Fri Sep 08, 2006 12:11 pm
by seanmckenna
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?

Posted: Fri Sep 08, 2006 4:10 pm
by MichaelNesmith
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?

Posted: Fri Sep 08, 2006 4:19 pm
by seanmckenna
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.