Open mrchief opened 9 years ago
Separate custom actions might be better. Not sure if we'd need to have a separate 64bit NuGet package to support this. Is your MSI compiled as 32bit or 64bit?
If we need to ensure we run 64 bit PowerShell, we might need to do something like this - http://stackoverflow.com/questions/19055924/how-to-launch-64-bit-powershell-from-32-bit-cmd-exe.
Is this something you'd be interested in implementing?
My MSI is compiled as 64 bit and despite all theories about how SFXCA.dll should automatically load the appropriate bit server, evidence points to contrary.
I can give it a try but I think Wix documentation is not tested - more of theory and "should happen" stuff rather than actually battle tested. So a 64bit CA also may not solve the underlying issue (their own 64bit CA still loads the 32 bit server).
Currently I'm invoking PowerShell via a custom action and executing my stuff in ps1 script.
Probably also need to do this http://stackoverflow.com/questions/7769580/how-should-i-create-or-upload-a-32-bit-and-64-bit-nuget-package to support referencing 64bit custom action
@flcdrg I don't have a 32 bit package (and luckily I don't have to support both x86 and x64). Its totally x64 right now.
Same issue. Tried to use this way of scripting to get around WiX not being able to set WebAppPool to 'No Managed Code' (https://github.com/wixtoolset/issues/issues/5226). Sadly it requires WebAdministration and powershell chokes on it with the same error.
Trying any cmdlet involving WebAdministration, causes throws errors during install. E.g., the following script:
will result in this error:
Googling (this and few others) indicate the root cause towards being a 32bit process trying to load a 64bit cmdlet (and its subsequent dependencies).
I'm not sure if changing the platform to x64 will be the best solution (even though x64 cmdlets will run on both 32/64 bit platforms). Alternatively, a separate 64 bit custom action will probably enable the user to choose between either and probably will be most flexible.
Thoughts?