Groups | Blog | Home
all groups > visual studio .net setup > march 2007 >

visual studio .net setup : Custom Action on uninstall



Sergio
3/5/2007 11:56:01 PM
My setup contains custom action(.net exe) to be launched on uninstall.

If after installation exe containing custom action is removed
uninstall failed with file not found exception.

I suggest that i have to add condition that checks existing of custom
action exe

How can i do this?

Thanks in advance,
Sergey
Phil Wilson
3/6/2007 7:21:46 AM
You don't have to physically install a program used for a custom action -
you can set its Exclude property so it's not visible to users (it's in the
cached MSI file and is run from there).

--
Phil Wilson
[Microsoft MVP-Windows Installer]
[quoted text, click to view]

Sergio
3/7/2007 10:12:37 PM
[quoted text, click to view]

Phil thank you forthe answer. But seems it doesn't work for mee. I get
following compile rror after excluding custom action .exe from setup:
Building file 'D:\temp\Setup1\Setup1\Debug\SergeySetup.msi'...
ERROR: Unable to build custom action named 'TestInstaller.exe' from
object 'TestInstaller.exe' because the object is marked as excluded.

Any tip ?
Thanks
Sergio
3/7/2007 10:48:42 PM
[quoted text, click to view]

Setting exlude to true only works for ummanaged CustomAction, but my
CustomAction is .net assembly with installer class.
I read your article "http://www.simple-talk.com/dotnet/visual-studio/
visual-studio-setup---projects-and-custom-actions/" it's helpfull but
not in my case.
Phil Wilson
3/9/2007 7:42:03 AM
Ah ok, unmanaged custom actions only. That's a pain.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
[quoted text, click to view]

Sergio
3/10/2007 9:13:01 PM
[quoted text, click to view]

Ok thanks lot, i'll try to figure out another solution.
AddThis Social Bookmark Button