0
votes

I've got a deployment script that works with the BizTalk Factory snapin, which only functions in x86. However, I have a script of a larger scope that wants to invoke this script, in theory by using Start-Process powershell.exe. Unfortunately, on x64 machines (i.e. all of them) this line will invoke the x64 version of powershell by default, and I'm not sure about how to invoke only the x86 version.

I've looked around in environment variables and while I can detect the bitness of the current powershell environment, I don't know of any way to programmatically start the right version. Am I forced into specifying a hardcoded absolute path of the x86 executable?

1

1 Answers

2
votes

If you are x64, then you can execute $Env:SystemRoot\SysWOW64\WindowsPowerShell\v1.0\powershell.exe to run the 32-bit version.