In the options, I choose Custom
shell and point to C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
. But it still launches 32-bit powershell for me. What should I do for now?
1 Answer
GitHub Desktop seems to be a 32-bit application. As you're running it on a 64-bit system Windows changes certain paths and environment variables in the background using file system redirection. This also happens e.g. for the registry. Both is done in order for the 32-bit application to find the files it needs in the appropriate places.
So while a 64-bit application launching C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
would start a 64-bit PowerShell a 32-bit application would launch a 32-bit PowerShell. If you go ahead an check the question "How to launch 64-bit powershell from 32-bit cmd.exe?" you will find that you should be able to use a path that references sysnative
instead of system32
in order to launch a 64-bit application from a 32-bit application. So you would reference:
%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe
This isn't working for me on Windows 7 64-bit though it should be available for systems since Vista.
This article seems to have a bit more information about the whole thing and this article as some more in depth information about side effects if you opt to disable the redirection.
[Environment]::Is64BitProcess
command to determine if a powershell session is 64 or 32 bit. Only Github Desktop makes it wrong.C:\Windows\Sysnative
instead ofC:\Windows\System32
to bypass file system redirection as @Seth already linked to How to launch 64-bit powershell from 32-bit cmd.exe.