Windows Installer uninstalls MSI packages in passive mode so UI is not 
displayed.

Ever get the feeling like you're not supposed to show UI during the uninstall 
of an MSI?  Yeah, me too. <wink/>

_______________________________________________________________
 FireGiant  |  Dedicated support for the WiX toolset  |  
http://www.firegiant.com/

-----Original Message-----
From: Harold Wood (H10 Capital) [mailto:v-wow...@microsoft.com] 
Sent: Wednesday, March 19, 2014 2:49 PM
To: General discussion about the WiX toolset.
Subject: [WiX-users] uI on silent uninstall

Ok this is what I have so far:

Product.wxs


      <!--Display the uninstall message box so user is informed we will not 
remove the databases-->
      <Custom Action ="UninstallMessage"         
After="InstallFinalize">Remove</Custom>
      <Custom Action ="UninstallMessage.Show"    
After="UninstallMessage">Remove</Custom>

CustomAction.cs

[CustomAction]
      public static ActionResult UninstallMessage(Session session)
      {
          if (session == null)
          {
              
logEventsApp.WriteLoggingEvent(string.Format(CultureInfo.InvariantCulture, "{0} 
; {1}", Resources.ArgumentNullError, "session"), session);
              throw new ArgumentNullException("session", 
Resources.ArgumentNullError);
          }

          // This is just to display a message box that informs the user that 
they will have to remove the databases manually
          StringBuilder notificationMessage = new StringBuilder("The actual 
databases will not be removed from the server by this.");
          notificationMessage.Append("\r\n\r\n");
          notificationMessage.Append("You will have to manually remove the 
Databases from your server.");

          Record record = new Record();
          record.FormatString = notificationMessage.ToString();
          MessageResult value = session.Message(InstallMessage.Info | 
(InstallMessage)MessageIcon.Warning | (InstallMessage)MessageButtons.OK, 
record);

          return ActionResult.Success;
      }

And im still not getting the message box.  So what am I doing wrong?

Thanks

Woody
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the 
definitive new guide to graph databases and their applications. Written by 
three acclaimed leaders in the field, this first edition is now available. 
Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to