Indigo Rose Software

Go Back   Indigo Rose Software Forums > Setup Factory 8.0 > Setup Factory 8.0 FAQ

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2008
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
Uninstall a Shortcut Created with Actions

Question:
Uninstall a Shortcut Created with Actions

Answer
This article explains shortcut creation and how to remove shortcuts created by actions.
There are two ways to create shortcuts in Setup Factory. The first is through File Properties and the second is by using a Shell.CreateShortcut action. All shortcuts created using the File Properties method will be removed automatically when the program is uninstalled, however shortcuts created with the Shell.CreateShortcut action will not be removed automatically.

In order to remove shortcuts created using a Shell.CreateShortcut action, a Shell.DeleteShortcut action must be used. The best way to accomplish this is to use a Shell.DeleteShortcut action on the "After Uninstalling" event. Using this method, here is the order of events that will occur during uninstall:

Uninstall starts
- Perform actions listed on the "Before Uninstalling" tab
- Remove files installed by setup
- Remove shortcuts created from File Properties
- Remove folders created by setup
- Other uninstall functions
- Perform actions listed on the "After Uninstalling" tab
- Uninstall shuts down

Note: Placing the Shell.DeleteShortcut action on the "Before Uninstalling" event will generally work as well as having them on the "After Uninstalling" event. Although it is recommended that the Shell.DeleteShortcut action be placed on the After Uninstalling tab to insure that all files are deleted before the shortcuts to them are.

Example:

Here is an example of an action that creates a shortcut in the Start Menu:
Shell.CreateShortcut(SetupData.GetAppShortcutFolde rPath(), "My Shortcut", SessionVar.Expand("%AppFolder%\\file.exe"));
--GetAppShortcutFolderPath is used so the shortcut is created where it is suposed to be.

Since we created this shortcut with an action, we will have to remove it with a Shell.DeleteShortcut action on the "After Uninstalling" event. Here is the Shell.DeleteShortcut action that will accomplish this:

Code:
Shell.DeleteShortcut(SetupData.GetAppShortcutFolderPath(), "My Shortcut");
Notice that the Folder and Shortcut description fields for both actions are identical.
In general any Shell.CreateShortcut action should have a corresponding Shell.DeleteShortcut action on the "After Uninstalling" event to ensure that all shortcuts are uninstalled properly.

MORE INFORMATION

For more information please see the following topics in the Setup Factory Help:

Program Reference | Actions | Shell | Shell.CreateShortcut
Program Reference | Actions | Shell | Shell.DeleteShortcut

Last edited by Adam; 04-29-2008 at 01:56 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Uninstall Shortcut SteveinVegas Setup Factory 7.0 Discussion 2 12-02-2006 09:49 AM
Shortcut Folders Not Deleted by Uninstall csd214 Setup Factory 7.0 Discussion 2 10-03-2005 01:17 PM
Uninstall Data – Questions and Bugs (?) csd214 Setup Factory 7.0 Discussion 5 06-21-2005 12:05 PM
HOWTO: Include Uninstall Support Support Setup Factory 6.0 Knowledge Base 0 09-26-2002 03:33 PM
HOWTO: Uninstall a Shortcut Created with Actions Support Setup Factory 6.0 Knowledge Base 0 09-25-2002 10:50 AM


All times are GMT -6. The time now is 07:34 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software