[wix-users] Custom Action Issue
gmatzen at osisoft.com
Tue May 29 05:57:13 PDT 2018
Property changes get logged, so you can set a property instead of logging.
Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------
From: Ven H via wix-users <wix-users at lists.wixtoolset.org>
Date: 5/29/18 3:49 AM (GMT-08:00)
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: Re: [wix-users] Custom Action Issue
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.
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
> 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.
> 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 https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwICAg&c=rxxrGm2iek7pTJSSe1mAiw&r=8MUQEKTKe_mBRfow6NKhbaPfXB9hL3W80bUJJehenQg&m=8OxhGBcrQcEZP8bYgEaQ_TFOUUQo2Sskg-yZrHkABlU&s=041OLT2fm1kRduQ633sv6vR0iVcu0NlITzS8mnphb7s&e=
More information about the wix-users