4

I'm trying to use cmd.exe through AutoIt script. When I run(c:\windows\system32\cmd.exe) and try to launch manage-bde the error

is not recognized as an internal or external command, operable program or batch file

is coming. run(cmd.exe), manage-bde works well. With the complete path included, I wonder why first command doesn't work.

Additionally, Win + R and run cmd.exe, then launch manage-bde works well. Windows and search cmd.exe and launch manage-bde works as well.

user4157124
  • 2,809
  • 13
  • 27
  • 42
user10057923
  • 43
  • 1
  • 3

1 Answers1

5

Some files in System32 are not in SysWOW64.

On a 64 bit OS running a 32 bit process, redirection sets the system folder as SysWOW64. You can access the System32 folder by using the magical SysNative in the path i.e.

C:\Windows\SysNative\cmd.exe

or from this help page Running under Windows 64-bit Edition you could use (and use False argument when done)

_WinAPI_Wow64EnableWow64FsRedirection(True)

or run AutoIt as 64 bit.

michael_heath
  • 5,262
  • 2
  • 12
  • 22