Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Remove Icons


3 replies to this topic

richardGobar

richardGobar
  • Members
  • 2 posts

Posted 10 January 2002 - 12:08

How can I remove icons created using installscript when i remove the product.

pdriley

pdriley
  • Members
  • 91 posts

Posted 10 January 2002 - 12:18

DeleteFolderIcon in a custom action, using conditions to make sure it only runs on uninstall.

richardGobar

richardGobar
  • Members
  • 2 posts

Posted 10 January 2002 - 14:40

Thanks Paul.

I had added the deletefolderIcon code but could not find a condition to make it fire. I tried running the code anyway at the end of the installation just to see if it would work and the installer locked up. The essential code I ran was

DeleteFolderIcon(szProgramfolder, szItemName)
where szProgramFolder = "" ie programs menu
and szItemName was the name on the programs menu

Any further help would be much appreciated


pdriley

pdriley
  • Members
  • 91 posts

Posted 10 January 2002 - 19:31

Not sure why it would lock up, I personally abandoned using InstallScript when we moved to ISDev.  Maybe someone else can help with that.

A good use of conditions for creating icons would be:

On the CreateIcon CA:
($MyComponent = 3) And (?MyComponent <> 3)

On the DeleteIcon CA:
($MyComponent = 2) And (?MyComponent <> 2)

Where MyComponent is the Component key for the component containing the file which the shortcut points to.

The first condition says "when this component is installed locally (and not reinstalled)".  The second says "when the component is uninstalled locally (and not ignored on reinstall)".

If you're using advertising and want these Icons to advertise a file then it's a bit more complicated :-D