[wix-users] Custom Action Issue

Ven H venh.123 at gmail.com
Tue May 29 08:46:18 PDT 2018


Thank you Edwin. I saw that link, but it was not very helpful.

Regards,
Venkatesh

On Tue, May 29, 2018 at 6:50 PM, Edwin Castro <egcastr at gmail.com> wrote:

> According to
>
> https://msdn.microsoft.com/en-us/library/windows/desktop/
> aa372835(v=vs.85).aspx
>
> error code 2896 is
>
> Executing action [2] failed.
>
> --
> Edwin G. Castro
>
>
>
>
> On Tue, May 29, 2018, 03:49 Ven H via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
>> Upon searching further, I found the below link which says,from DoAction
>> control event, session.Log does not work. If so, what is the alternative.
>> I
>> even tried session.Message, even that doesn't seem to work.
>>
>> https://stackoverflow.com/questions/3494101/wix-c-sharp-
>> custom-action-logging-not-working/3503257
>>
>> Regards,
>> Venkatesh
>>
>> On Tue, May 29, 2018 at 3:15 PM, Ven H <venh.123 at gmail.com> wrote:
>>
>> > I am building an MSI with a UI screen which captures a user name and
>> > password to create a login in SQL. The DB server name is captured in
>> one of
>> > the previous screens and mapped to a property. When the user clicks on
>> Next
>> > button, a Custom Action is called. In this CA, the following things take
>> > place.
>> >
>> > A SQL statement is called to create the login, either in local / remote
>> > SQL server.
>> > ServiceController.GetServices (found in System.ServiceProcess.dll)
>> method
>> > is called to get all the services from the local / remote SQL Server
>> > machine. Since the ServiceController instance doesn't provide the path
>> of
>> > the executable behind the service, I am making some registry calls
>> (either
>> > to local / SQL Server machine) to get the exact instance of the SQL
>> Server
>> > service running on the machine and then call Stop and Start methods to
>> > restart the service from the CA code. You may argue this is bad, but
>> > unfortunately, this is a requirement.
>> >
>> > This CA is called on the Next button click, as mentioned earlier. There
>> > are enough session.Log calls and I am trying to log each and every step.
>> > This is built using .Net v4.0 (I tried with v4.6.1 also). I am using VS
>> > 2017 and Windows 7 machine to build it.
>> >
>> > 1. Now, while testing by executing the MSI from within my local Windows
>> 7
>> > machine, I try to select a remote SQL machine (Win 2012 R2 Std server)
>> and
>> > it sucessfully adds the login and restarts the SQL service.
>> >
>> > 2. But when I try to execute the MSI from within the Windows 2012 R2 Std
>> > server and select the same machine as the DB server, the CA fails.
>> > Unfortunately, the log doesn't show any of my messages. However, there
>> is a
>> > line which says something like "Invoking remote custom action...". Looks
>> > like the error number is 2896. I didn't get much from internet on this
>> > error (except one slightly helpful link below. Things look fine as per
>> that
>> > link). However, while executing the MSI from the msiexec command in
>> > PowerShell console as admin from the Windows 2012 machine, it runs
>> > successfully. But here also, my log messages are not there in the logs.
>> The
>> > CA has no Impersonate attribute also.
>> >
>> > https://siderite.blogspot.com/2010/07/msi-custom-action-
>> > error-2896-on-windows.html#at1688490813
>> >
>> > I am not sure what is wrong. Why the log messages are not at all getting
>> > logged into the MSI log file? Why does scenario 1 work whereas 2
>> doesn't.
>> >
>> > Can anyone please help?
>> >
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>



More information about the wix-users mailing list