[wix-users] Possible to invoke 64bit Elevated Custom Action Server?

eto eto at carillon.ca
Thu Jul 27 11:34:55 PDT 2017


I built a Microsoft Exchange Server Transport Agent Plugin, essentially is just a 64bit dll. However this dll needs to be register with the Exchange Server. To do that, I need to use PowerShell scripts to run a brunch of scripts in order to register the plugin with the Exchange Server.

The problem is that the installer would only launch a 32bit version of the PowerShell, no matter what I do/set in the wxs file. Despite me specifying:

Platform="x64"
Win64="yes"
DllEntry="WixQuietExec64"
Every single methods I've read and tried, in the install log it would always prints the following:


MSI (s) (40:14) [11:27:50:263]: Running as a service.
MSI (s) (40:14) [11:27:50:266]: Hello, I'm your 32bit Elevated Non-remapped custom action server.
WixQuietExec64:  Entering WixQuietExec64 in C:\Windows\Installer\MSI471F.tmp, version 3.11.1701.0

Despite using the WixQuietExec64... Which leads me to think that, the root cause is the MSI only launch its 32bit Elevated custom action server... and I think we need a 64bit version of it to properly launch 64bit stuff correctly.

This is a major blocker because Microsoft Exchange Server came with a script call RemoteExchange.ps1 and in there, it has registry calls trying to fetch the registry values and it can only read those value if you run the script in 64bit Powershell. (there are other ways to read the registry under 32bit yes, but I can't go and modify the out of the box script came with Exchange Server).

I have these specified in my wxs file:

<SetProperty Id="InstallPlugin"
     Before ="InstallPlugin"
     Sequence="execute"
     Value =""[SystemFolder]WindowsPowerShell\v1.0\powershell.exe" -Command "cd '[INSTALLFOLDER]'; & '[#InstallPS1]' ; exit $$($Error.Count)"" />
<CustomAction Id="InstallPlugin" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" />

<InstallExecuteSequence>
  <Custom Action="InstallPlugin" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>


I printed out the $PSHome in my script just to see which one it was launched by the installer, and it is the 32bit… as you can see, it is launching the 32bit Powershell when I requested to use Exec64…

WixQuietExec64:  C:\Windows\SysWOW64\WindowsPowerShell\v1.0




Regards,

Eric To
eto at carillon.ca <mailto:eto at carillon.ca>

Carillon Information Security Inc.
http://carillon.ca <http://carillon.ca/>




More information about the wix-users mailing list