Consider the following powershell script:
If I run this directly inside powershell on a 64bit machine, then I correctly get
But when I wrap this inside a self-extracting installer using Inno Setup (that is built on a 32bit machine) I always get:
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.