<p>I created a class derived from System.Configuration.Install for my installer.<br>
But the code in Uninstall() is being called when I try to update the application.<br>
How can I detect that the user is trying to update instead of uninstall?</p>

<p>Maybe <a href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.languages.csharp&amp;tid=a018d064-8bb8-441d-bccc-f5ce2cc665eb&amp;cat=&amp;lang=&amp;cr=&amp;sloc=&amp;p=1" rel="nofollow noreferrer">this post</a> explains it better than me:</p>

<blockquote>
  <p>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.</p>
</blockquote>

Blind guess here, but I'd start out by checking the
Installer.Context
property for a
parameter
. If that's no help, there may be something in the savedState parameter passed to
Uninstall
.
Last chance would be to
prompt the user
, and set the child installers as appropiate.