Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have enabled the telnet client on my Windows 7 64-bit machine and if I open the start menu and launch cmd from there I can run telnet.

I normally use the keyboard shortcut Win-C, implemented by this AutoHotkey snippet to open a console.

#c::Run, C:\WINDOWS\system32\cmd.exe

For some strange reason when I try to run telnet in a console window opened this way I get

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Steve\Documents>telnet 'telnet' is not recognized as an internal or external command, operable program or batch file.

Running path in any console, regardless of how it was opened produces the same output.

Can anyone shed any light on why telnet might run in one console but not the other?

share|improve this question
1  
Get Process Exporer from Sysinternals and examine both processes' environments. See if there is any difference anywhere. –  paradroid Apr 19 '12 at 15:34
    
I can see they differ. Not sure how to fix the problem but at least it makes sense now why the problem happens. –  Steve Crane Apr 19 '12 at 21:39
1  
If you edit your question with the differences you see (data or screenshots) somebody may be able to tell you. –  paradroid Apr 19 '12 at 21:43

3 Answers 3

A code snippet would have made posting a solution far, far easier!

Your problem is the path command rulez still apply to DOS even when running under Windows.

Have a closer look at your path in each environment mentioned, and the location of the telnet program, and check whether the command processor will find the executable in each case. You should be able to specify the complete pathname of the telnet program name in AHK which should solve your problem.

Alternatively put a batch file called telnet.bat in your documents folder which calls the actual telnet program.

Don't forget in either case to pass telnet the command line input parameters, ie: /telnet.exe %0 %1, etc

share|improve this answer
    
Some good ideas but I ended up just using telnet from a virtual Linux machine. Even when I ran telnet on Windows it didn't work as the tutorial I was working through said it should. The Linux one did. –  Steve Crane Jul 1 '12 at 20:12
    
Not sure what code snippet you were expecting, this is after all a question about running an application, not writing one. –  Steve Crane Jul 1 '12 at 20:14

I gave up quickly on trying to work out what caused this problem as I had no pressing need to do so. I was able to execute telnet, just not in the way I initially tried. Even when I did run it I found it to be less useful than telnet in a virtual Linux machine. I last made much use of telnet (in Windows anyway) on XP and the telnet on Windows 7 seems to have taken a step backwards from that one.

share|improve this answer

Update:

You should verify that telnet.exe is correctly installed.

On a Win7 64bit installation you can find it in a directory named similar to this one:

*C:\Windows\winsxs\amd64_microsoft-windows-telnet-client_31bf3856ad364e35_6.1.7600.16385_none_1426830c3ebb712d*

If it is not present, deinstall and reinstall it.

share|improve this answer
    
Perhaps you didn't understand my question. The first sentence says that I have enabled (installed if you will) the telnet client. –  Steve Crane Jul 1 '12 at 14:34
    
I am sorry, even with your comment I had to read your question three times for finding the relevant part. If you mean installed the please say it. –  Robert Jul 1 '12 at 16:19
    
I imagine if I meant installed I would have used the word. Out of interest I just Googled for "windows 7 telnet" and the first few hits use install or enable; one even talked about "how to use telnet on Windows 7". As the files are already installed on the computer I see the program needing to be enabled rather than installed, but would certainly have no problem understanding either. –  Steve Crane Jul 1 '12 at 20:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.