简体   繁体   中英

Powershell issue - 32-bit vs 64-bit

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

要启动并打开32位命令提示符,您需要输入:

$env:windir\SysWoW64\cmd.exe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM