Running cmd from absolute path has it fail to recognise manage-bde command
Asked Answered
B

1

5

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.

Birl answered 10/7, 2018 at 8:9 Comment(0)
W
6

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.

Welterweight answered 10/7, 2018 at 14:31 Comment(1)
@Birl Select this answer if it helped.Comeback

© 2022 - 2024 — McMap. All rights reserved.