I created a class derived from System.Configuration.Install for my installer.  

But the code in Uninstall() is being called when I try to update the application.  

How can I detect that the user is trying to update instead of uninstall?

Maybe [this post](http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.languages.csharp&tid=a018d064-8bb8-441d-bccc-f5ce2cc665eb&cat=&lang=&cr=&sloc=&p=1) explains it better than me:

> 
> My problem boils down to: when the
>  user performs an update (i.e. double
>  clicks on MyAppVer2.msi when they
>  already have MyAppVer1.msi installed)
>  the Uninstall method inside my
>  Installer is called first, but I have
>  no apparent property to check from
>  inside this method to detect that an
>  update is being performed so that I
>  can branch my code appropriately.
> 
> 
>