-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi!
I've noticed that some of actions that CWA MSI installer runs on Windows are using 32-bit registry lookup and subsequently powershell to run permission.ps1
script. There is nothing wrong with that per se, it works on most setups, but in some rare cases, using 32-bit powershell is not desirable/possible in the 64-bit environment. Overriding POWERSHELLEXE parameters doesn't solve the issue completely as well, as 32-bit powershell is still being used under the hood:

Assuming everything about the CWA build and packaging is already 64-bit, is there any reason these operations remain 32-bit (at least from the consistency point of view)?
If I apply a few transformations to the default AWS MSI with just 2 changes equivalent to the following WSX operations, all subsequent operations are done by the 64-bit powershell:
s/WixQuietExec/WixQuietExec64/
inamazon-cloudwatch-agent-test/msi/tools/amazon-cloudwatch-agent.wxs
Lines 176 to 181 in df584e5
<CustomAction Id="QtExecUpdateConfigPermission" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" /> - Add
Win64='yes'
toRegistrySearch
inamazon-cloudwatch-agent-test/msi/tools/amazon-cloudwatch-agent.wxs
Lines 28 to 32 in df584e5
<RegistrySearch Id="POWERSHELLEXE" Type="raw" Root="HKLM" Key="SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" Name="Path" />
I'm happy to submit a patch if you think the changes above are a good idea, otherwise sorry for the noise!
Thanks in advance!