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?