Moving to 64 bit: Running a 64 bit PowerShell console inside PrimalScript 2009

PrimalScript 2009 is a 32 bit application, so by default it uses the 32 bit version of PowerShell even on a 64 bit machine for the embedded console.

If you are dealing with mostly 64 bit server software you may want to make the embedded shell use the 64 bit version of PowerShell. The default installation of PowerShell under Windows 7 is at C:\Windows\System32\WindowsPowerShell\v1.0

And yes, that is still true for PowerShell V2.

The system32 folder is mapped to SysWOW64, which is the actual 32 bit version of the that folder. I know, the numbering scheme is a bit confusing.

Fortunately with Vista 64bit, Server 2008 64 bit and Windows 7 64 bit there is a path specification that explicitly points to the 64 bit folder.

Open PrimalScript 2009 and select Tools – Options – Environment – Command Window.

Select “Other Process” and enter the following path:



Press OK and use View – Other Windows – Command Window to bring up the embedded shell if you don’t have it active yet.

You can now actually right click and toggle between the 32 and the 64 bit shell using either “Windows PowerShell” or PowerShell.exe

Drag and drop you scripts, partial code or snippets onto the embedded shell to run things.


How can you tell the difference? While there is no obvious variable that screams 64 or 32 bit, I found the following a good indicator:

Type ls env:programfiles

If it has a value of “C:\Program Files” you are in a 64 bit shell, if it says “C:\Program Files (x86)” you have a 32 bit PowerShell instance running.