4

A few years back I made a couple of console command line apps which at the time worked with no issues. I'd place them in the window/system32 directory and be able to use them from the console prompt from anywhere on my system(Windows XP at that time).

Now I'm using Windows 7 64bit and this no longer works. I've tried placing my little console apps in system32, syswow64, Windows on down to the root of my c: drive, but windows continues to give me the same reply "'check' is not recognized as an internal or external command, operable program or batch file."

But! If I am within the same directory as the program it works as intended. I'm assuming there's either a 32bit/64bit app issue or OS internal security issue.

Can anyone point me in the right direction here? Do I need to create a directory in "Program Files(x86) and add that new directory to the PATH environment?


Additional Note: This is a program I created. It is not a batch file. The program does work as it should when you are in the same directory as the program while you are in a console window.

6 Answers6

1

The easiest way, though, would be utilizing Windows's PATH environment variable. It ensures 100% the same functionality and doesn't involve you putting anything into the Windows directory. There's other questions directed at the same thing, the answers in this thread should put you up to that.

1

The environmental variable for PATH did not contain the windows directory nor either of the system directories. I added all three paths to the PATH variable and now everything works as intended.

Thanks to everyone who replied with ideas, suggestions and questions.

1

.EXE might be removed from PATHEXT in environment variable.

If this is the case add .EXE to PATHEXT.

slhck
  • 235,242
0

You're not saying whether you're running the program from a 32-bit command prompt or a 64-bit one. The 32-bit one will look in the SysWOW64 directory (it will see it as System32), and the 64-bit one will look in the System32 directory. (This should be a comment but I don't have enough rep to comment yet.)

If it's not clear, the 64-bit one is C:\Windows\System32\cmd.exe, the 32-bit one is C:\Windows\SysWOW64\cmd.exe. If you're ever not sure what the bitness of an open prompt is, just run the 'set' command and look at the value of the 'ProgramFiles' environment variable. The 64-bit prompt should show it as C:\Program Files, the 32-bit one as C:\Program Files (x86).

0

Regarding the part where you get "is not recognized as an internal or external command", take a look at this article:

Cannot Ping getting 'ping is not recognized as an internal or external command'

Khattab
  • 109
  • 4
0

1.>make Android folder in C drive (C:\Android) 2.>paste debug.keystore in Android Folder (C:\Android\debug.keystore)

keytool -exportcert -alias androiddebugkey -keystore "C:\Android\debug.keystore" | "C:\OpenSSL-Win32\bin\openssl.exe" sha1 -binary | "C:\OpenSSL-Win32\bin\openssl.exe" base64