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

Custom Action

How do I invoke Custom Action 1 during install and Custom Action 2 during uninstall.

Custom Action 1 must only be called on install

Custom Action 2 must only be called on Uninstall

I have a Basic MSI project
Labels (1)
0 Kudos

(5) Replies
Naveed
Level 6

Custom Action 1 must only be called on install --> set condition NOT Installed

Custom Action 2 must only be called on Uninstall --> set condition REMOVE = "ALL"
0 Kudos
jsheth
Level 3

Naveed: Where would I set this up?

Installation Designer->Behavior and Logic ->Custom Actions and Sequence ->Install Exec Condition??
0 Kudos
Naveed
Level 6

Yes. you have to specify it in condition. Please view attached image.
0 Kudos
jsheth
Level 3

Naveed:
Thanks for that. That worked. Another newbie question. When I go to run 'Uninstall' things work fine, except that the directories created during install still exist, I can delete them manually, and are not deleted during uninstall process. Something in the Custom Action or a different setting?
0 Kudos
cbragg
Level 7

Is anything left in these folders? If the application creates files when it runs then the installer will not remove these because it didn't install them and doesn't know to remove them and will leave behind the folder structure that they are in.

If you application does do this and you do want to remove those files, you can provide an entry in the removefile table. MSDN provides details on the entires to add to this table here: http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx. Please note that the file column can contain wildcards such as *.log or even *.*
0 Kudos