What do we need to do?
1.Register a new protocol (in our case, let’s call it “telnet”) to Windows’s registry.
2.Create a batch file that can take in strings such as “telnet://google.com/” and massage them and pass them on to putty.exe
3.Point the registry modification to that batch file.
1. To edit the registry is to create a .reg file, save it, right click it and select merge.
Here is an example .reg file which points the protocol “telnet” to a batch file located at “C:/mliao/putty_util.bat” :
my.reg:
REGEDIT4
[HKEY_CLASSES_ROOT\telnet]
@="URL:telnet Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\telnet\shell]
[HKEY_CLASSES_ROOT\telnet\shell\open]
[HKEY_CLASSES_ROOT\telnet\shell\open\command]
@="\"C:\mliao\putty_util.bat\" %1"
Now save my.reg locally, right click it, and select merge.
Unfortunately, PuTTY does not understand arguments which start off with “telnet://” .
2. As a result, we must use a batch file (putty_util.bat) to remove the “telnet://” and any other oddities.
Here is the batch file:
putty_util.bat:
@echo off
set var=%1
set extract=%var:~9,-1%
"C:\mliao\putty.exe" %extract%
set extract=%var:~9,-1% is telling us to remove the first 9 characters and the last character from var and place that value in extract.
Reference:
http://johnsofteng.wordpress.com/2009/05/12/launch-putty-from-browser/
3. In addition.
"Telnet--The Telnet protocol handler is no longer supported in Internet
Explorer 7."
You can turn it back on in IE7 but it requires a Registry tweak. If you are
comfortable working with the Registry, you can use the Registry Editor to
navigate to the following Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet
Explorer\Main\FeatureControl\FEATURE_DISABLE_TELNE T_PROTOCOL
DWORD Name = iexplore.exe
DWORD Valure = 0(Zero)
Or, you can download a .reg file:

被折叠的 条评论
为什么被折叠?



