I have a windows 10 laptop (it's pretty old, but I don't think that should be a problem). I followed the instructions and went through control panel and enabled Telnet Client using an admin password. However, when I launched cmd and typed telnet, I received the error message "telnet could not be recognized as an internal or external command..." I also tried this with an admin-powered cmd and got the same error.
After a bit more of searching, I found a command that should enable telnet. I typed in "dism /online /Enable-Feature /FeatureName:TelnetClient" and it said something like installation complete. However, even after typing telnet into cmd, I got the same error message.
Edit: I located telnet.exe in the System32 folder and if I run it from file explorer directly it works fine. However, when I type in the path in cmd I am getting the same error message. And if I type "start path/telnet.exe" I also get the same error message.
Edit 2: I added system32 to the path variable, but typing "start path/telnet.exe" just gives the error message that it couldn't locate it.
Edit 3: it seems that cmd is not even recognizing the existence of telnet.exe. I followed Binarus' help and typed in dir c:\windows\system32\telnet.exe and am getting file not found. Anyone know what I can do?
22 Answers
Your edit proves that telnet itself works correctly. I suspect that your problem is caused by its parent directory not being in the path. If you don't know what that means, there are several starting points to learn about it, for example here.
To be honest, I wouldn't be that keen on starting telnet from the command line. Instead, you could easily create a shortcut to it (now that you have found it), place that shortcut on your desktop and start it by double-clicking the shortcut in the future.
However, if you insist on being able to start it from the command line, you have two options:
At the command line, type the full path, i.e. type
c:\windows\system32\telnet.exeinstead of justtelnet.Change your
PATHenvironment variable. One way to do that would be viaThis PC->Properties->Advanced System Settings->Advanced->Environment Variables. Please note that there are system-wide environment variables as well as user-related ones. If you change thePATHvariable system-wide, all users will have the pleasure of being able to opentelnetthe way you want; otherwise, only the respective user is affected. To test whether your changes worked, you can just typePATHin a command window; this will list all directories which are in the path for the current user.
I had this problem running telnet from a MSVC 2019 C++ program using System("start telnet"). When I did System("start cmd") and a dir on c:\windows\system32 telnet.exe was not displayed. In fact large number of files and directories were missing. I solved this by copying telnet.exe to a different directory. This worked for me because I am only using it to run a canned batch file. The telnet prompts are not displayed running in manual mode.