cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dave_barratt
Level 3

InstallScript AddInternetShortcut

Hi,
How would I remove an Internet Shortcut added using the InstallScript methods provided in this article: Q111350: CODE: Creating an Internet Shortcut Item in InstallScript, when my product is being uninstalled?

This is my function call....

function CreateWebAppShortcut(hMSI)

Presumably the hMSI has some property I can use to detect weither the product is being installed or uninstalled or in maintenance mode? What would I check to find out?

So I could have instead function call

function WebAppShortcut(hMSI) which could be called by a custom action in exec mode and the method could know what its got to do either add or remove by checking the hMSI handle property.
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Typically you would either create a condition on the custom action which invokes this code, or you would evaluate a condition in the script itself. In either case, I would recommend tying it to the installation action state of a component in your install. Per Conditional Statement Syntax, the syntax would look like $component-name > 2, or $component-name = 2, depending on whether you wanted to detect installation or uninstallation.
0 Kudos
dave_barratt
Level 3

Hi, thanks for answering. So i could test for INSTALLSTATE_ABSENT of one of my always installed features to detect if installing, thanks. My other question was how to delete the shortcut created using the installscript method, any ideas?
0 Kudos
dave_barratt
Level 3

http://helpnet.flexerasoftware.com/robo/projects/installshield17langref/removeallmode.htm
Actually this code snippet seems easier way of detecting if uninstalling from an installshield script.
0 Kudos