This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Removed old shortcuts
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 02, 2007
08:40 AM
Removed old shortcuts
Hi all,
I have created a new minor setup of a basic installshield project, and some shortcut names have been changed. Now if I upgrade the installation, I have duplicated shortcuts in my application's programm group.
Is there any easy why to remove the old shortcuts, or replace them by the new ones?
thanks
I have created a new minor setup of a basic installshield project, and some shortcut names have been changed. Now if I upgrade the installation, I have duplicated shortcuts in my application's programm group.
Is there any easy why to remove the old shortcuts, or replace them by the new ones?
thanks
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 02, 2007
10:51 AM
You could either author entries into the RemoveFile table of your project that specifies the shortcut LNK files to be deleted, or you could use a custom action (VBScript, DLL, EXE, InstallScript, etc.) that deletes these files for you. You can find information on the RemoveFile table in the following article:
RemoveFile Table - http://msdn2.microsoft.com/en-us/library/aa371201.aspx
Another approach would be to author a major upgrade instead of a minor upgrade, which will uninstall the existing installation and then install the new installation, eliminating the need to author the RemoveFile table or a custom action.
RemoveFile Table - http://msdn2.microsoft.com/en-us/library/aa371201.aspx
Another approach would be to author a major upgrade instead of a minor upgrade, which will uninstall the existing installation and then install the new installation, eliminating the need to author the RemoveFile table or a custom action.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 03, 2007
07:33 AM
I tried a major upgrade before as well, it didn't remove the install files - but I did not choose to remove first and install then, I use install first, then remove unused files.
However during meantime I searched arround a lot of threads in this forum and found a good way to remove my old shortcuts. For all others searching, here is what todo:
1. Create a new Installscript file, call the function ExFn_DeleteFolderIcon for example. Then use the DeleteFolderIcon to remove your legacy shortcuts, do not check for the error code (only for testing maybe), because the function will kindly fail if the shortcut is not available. Here is a sample function:
"Old Client Shortcut" and "Old manual Shortcut" are of course the old shortcutnames.
Now you need to create a new custom action. Call the Action RemoveOldShortCuts for example, perform the wizard (select Installscript, select the functionname and so on. Only add the Action into a suitable position in the Install Exec Sequence, I used After Create Shortcuts to make sure the FOLDER_PROGRAMS is available.
I hope this helps others with the same problem.
However during meantime I searched arround a lot of threads in this forum and found a good way to remove my old shortcuts. For all others searching, here is what todo:
1. Create a new Installscript file, call the function ExFn_DeleteFolderIcon for example. Then use the DeleteFolderIcon to remove your legacy shortcuts, do not check for the error code (only for testing maybe), because the function will kindly fail if the shortcut is not available. Here is a sample function:
function ExFn_DeleteFolderIcon(hMSI)
// To Do: Declare local variables.
begin
// Delete Legacy Icons just in case!
DeleteFolderIcon (FOLDER_PROGRAMS + "\\MyProgram", "Old Client Shortcut");
DeleteFolderIcon (FOLDER_PROGRAMS + "\\MyProgram", "Old manual Shortcut");
end;
"Old Client Shortcut" and "Old manual Shortcut" are of course the old shortcutnames.
Now you need to create a new custom action. Call the Action RemoveOldShortCuts for example, perform the wizard (select Installscript, select the functionname and so on. Only add the Action into a suitable position in the Install Exec Sequence, I used After Create Shortcuts to make sure the FOLDER_PROGRAMS is available.
I hope this helps others with the same problem.