Fix MSI installer to use 64-bit PowerShell (#451) #612
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses issue #451 by fixing the MSI installer to properly use 64-bit PowerShell instead of 32-bit PowerShell for running the
permission.ps1script.Changes Made
Updated RegistrySearch to use 64-bit registry: Added
Win64="yes"attribute to theRegistrySearchelement to ensure it looks up PowerShell path in the 64-bit registry hive instead of the 32-bit one.Changed CustomAction to use 64-bit PowerShell executor: Changed
DllEntryfromWixQuietExectoWixQuietExec64to use the 64-bit PowerShell executor.Technical Details
The changes are minimal but important:
Win64="yes"to the RegistrySearch elementDllEntry="WixQuietExec"toDllEntry="WixQuietExec64"These changes ensure consistency with the 64-bit environment that the CloudWatch Agent already targets, and avoid potential issues where 32-bit PowerShell may not be available or desirable in certain 64-bit environments.
Impact
Testing
The changes follow the exact recommendations provided in the original issue and align with:
Resolves #451
Thank you to @ikavalio for identifying this issue and providing the exact solution!