Product.wxs entries

First to define the custom actions


    <!-- uninstall message that we cant remove databases-->
    <CustomAction Id="UninstallMessage" Property="UninstallMessage" Value 
="Remove=[REMOVE]" Return="check" Execute ="immediate"/>
    <CustomAction Id="UninstallMessage.Show" BinaryKey="CustomActionBinary" 
DllEntry="UninstallMessage" Execute="deferred" HideTarget="no" Return="check"/>

Now to schedule them in the installexecutesequence

      <!--Display the uninstall message box so user is informed we will not 
remove the databases-->
      <Custom Action ="UninstallMessage"         
After="InstallInitialize">REMOVE</Custom>
      <Custom Action ="UninstallMessage.Show"    
After="UninstallMessage">REMOVE</Custom>      
    
And now the custom action code

[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 
            string notificationMessage = Resources.DatabaseNotRemoved;
            session.Log(notificationMessage);

            Record record = new Record();
            record.FormatString = notificationMessage;
            session.Message(InstallMessage.Warning, record);

            return ActionResult.Success;
        }

-----Original Message-----
From: Phil Wilson [mailto:phildgwil...@gmail.com] 
Sent: Friday, March 21, 2014 12:05 PM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] uI on silent uninstall

That might be the detail that makes the difference - messaget types of error 
and warning are shown by Session.Message and equivalents, but perhaps not the 
ones that resolve to INSTALLMESSAGE_USER.
---------------
Phil Wilson


On Fri, Mar 21, 2014 at 11:22 AM, Harold Wood (H10 Capital) 
<v-wow...@microsoft.com> wrote:
> I setup a custom action that only executes during uninstall, the custom 
> action code then uses the session.message function with the message type set 
> to warning.  This displays the message text I supply in the record. It works 
> great!  I thank everyone that supplied suggestions, they gave me the 
> direction I needed to get that task done.
>
> Again, Thanks everyone.
>
> Woody
>
> -----Original Message-----
> From: Phil Wilson [mailto:phildgwil...@gmail.com]
> Sent: Friday, March 21, 2014 9:12 AM
> To: General discussion about the WiX toolset.
> Subject: Re: [WiX-users] uI on silent uninstall
>
> In the general context of showing messages during MSI activities 
> session.message (aka MsiProcessMessage) is the correct answer. In the context 
> of this particular issue of showing a message during uninstall it isn't the 
> required answer because uninstall shows no UI and therefore session.message 
> won't show a message. As someone noted before, Windows really doesn't want to 
> show much UI during uninstall.
> ---------------
> Phil Wilson
>
>
> On Fri, Mar 21, 2014 at 3:22 AM,  <sergey.s.be...@yandex.ru> wrote:
>> it isn't official note from Microsoft. sample code for jscript custom action:
>>
>> https://github.com/Metrolog/ITG.NevaTest3303P/blob/master/ITG.BDE_PRO
>> /
>> BDECustomActions.js
>>
>>
>> For simple message box jscript Session.Message is optimal solution, why not?
>>
>>
>>
>>
>>
>>
>>
>>
>> С уважением,
>> Бетке Сергей Сергеевич.
>>
>>
>>
>>
>>
>> От: David Connet
>> Отправлено: четверг, 20 марта 2014 г. 18:02
>> Кому: General discussion about the WiX toolset.
>>
>>
>>
>>
>>
>> On 3/20/2014 6:32 AM, sergey.s.be...@yandex.ru wrote:
>>> why not jscript or vbscript inline custom actio
>>
>> http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx
>>
>> Dave
>>
>> ---------------------------------------------------------------------
>> -
>> -------- 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
>
> ----------------------------------------------------------------------
> -------- 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

------------------------------------------------------------------------------
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