0

I am having an issue on my machine with PowerShell (x86). If I type:

cmd

I get no output. However, If I type this into 64-bit PowerShell, I get the output:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

And idea why this is behaving this way? It's as if PowerShell (x86) is just not executing this command. I am running 64-bit Windows 7.

Edit: cmd is just an example of what's happening. It also happens when I want to execute foo.exe in some random folder. I'm looking for a solution for the general case of running executables in 32-bit PowerShell.

Edit: In case somebody with the same issue sees this, the way I was able to fix this was by changing my ComSpec environment variable to:

C:\Windows\SysWOW64\cmd.exe

1 Answer 1

1

To start and open a 32-bit command prompt you need to type:

$env:windir\SysWoW64\cmd.exe
Sign up to request clarification or add additional context in comments.

8 Comments

That's not really what I'm trying to do. What I want to know is why cmd doesn't work in 32-bit PowerShell, and how I can fix it.
And cmd isn't necessarily the command I want to run - it could be foo.exe in some random folder - the same thing is happening.
try this in your 32bit powershell session and tell me what returns: $env:ComSpec
I get: C:\Windows\system32\cmd.exe
then you can't run/start a 64bit application from a 32bit shell
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.