My Windows 10 cannot open .bat or .cmd format files

redball 1 Reputation point
2020-08-16T01:25:27.09+00:00

When you search for cmd in the search, you can find cmd, but no matter whether it is running with administrator privileges or running or not responding.

When running .bat (or .cmd), the file cannot be found and an error is reported.

And after my investigation, I found that my cmd is in Windows/Syswow64, not in /Windows/System32

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,740 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Kapil Arya 7,761 Reputation points MVP
    2020-08-16T06:04:23.137+00:00

    Hello,

    Try booting into Safe Mode and check if issue still persists:

    https://support.microsoft.com/en-in/help/12376/windows-10-start-your-pc-in-safe-mode

    Also, scan your system with Microsoft Defender or third-party AV you've installed (if any).

    Regards.

    0 comments No comments

  2. Sean Liming 4,511 Reputation points
    2020-08-16T22:21:21.427+00:00

    Is explorer.exe the shell to your system? If a 32-bit explorer.exe is launched on a 64-bit system, Windows will switch to Windows/syswow64.

    0 comments No comments

  3. Joy Qiao 4,891 Reputation points Microsoft Employee
    2020-08-17T08:20:21.277+00:00

    Hi,

    The cmd.exe in the SYSWOW64 directory is a 32 bit executable and therefore looks at the 32 bit part of the windows registry on a 64 bit version of Windows. What we should do is regardless of whether the Windows environment is a 32-bit or 64-bit one, the cmd.exe from C:\Windows\System32 should always be used.

    If you can't find cmd.exe in System32, we could copy it from a same system version computer. Or download system image from Microsoft website and copy the file from image to your device.

    Bests,


  4. Darrell Gorter 1,306 Reputation points
    2020-08-17T15:26:41.743+00:00

    Hello,
    If you are not find *.cmd files and *.bat files that are located in the \Windows\syswow64 folder you may need to add c:\Windows\syswow64 to your path statement.

    0 comments No comments