wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 24 forks source link

Wix 3.11 needs 64bit Elevated action server #5655

Closed totszwai closed 7 years ago

totszwai commented 7 years ago

WiX version 3.11.0.1701 Visual Studio 2017 Latest VS2017 Toolset Extension .NET Framework 4.6 Windows Server 2012 R2 Standard

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:

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 ="&quot;[SystemFolder]WindowsPowerShell\v1.0\powershell.exe&quot; -Command &quot;cd '[INSTALLFOLDER]'; &amp; '[#InstallPS1]' ; exit $$($Error.Count)&quot;" />
<CustomAction Id="InstallPlugin" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" />

<InstallExecuteSequence>
  <Custom Action="InstallPlugin" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>`
robmen commented 7 years ago

For support please contact the wix-users mailing list.

It is possible through discussion a specific bug in the WiX Toolset will be uncovered but usually someone can help you find the error in your .wxs code.

totszwai commented 7 years ago

Is it an error in MY code though? I just print out $PSHome and as you can see, it is launching the 32bit Powershell when I requested to use Exec64...

WixQuietExec64:  C:\Windows\SysWOW64\WindowsPowerShell\v1.0
robmen commented 7 years ago

It is possible through discussion a specific bug in the WiX Toolset will be uncovered but usually someone can help you find the error in your .wxs code.