Consider the following powershell script:
[System.IntPtr]::Size
[Environment]::Is64BitProcess
If I run this directly inside powershell on a 64bit machine, then I correctly get
8
True
But when I wrap this inside a self-extracting installer using Inno Setup (that is built on a 32bit machine) I always get:
4
False
How do I make sure powershell is running in 64bit mode when on a 64bit computer (and 32bit for 32bit computer)?
I have also tried executing a batch file which calls the powershell script, assuming that the system would start powershell in its default mode, but this also doesn't work.
I have also tried iexpress to wrap the program, same problem.