Setup Mobaxterm with Eve-NG

This post is just to bookmark the solution from the Stackoverflow link below, Mobaxterm is not in a standard installation path in the below example, please modify your code based on your circumstances.

https://stackoverflow.com/questions/62150858/how-to-use-mobaxterm-as-default-telnet-handler-in-eve-ng

Create a batch file with below content, then place it in a folder such as “C:\Program Files\EVE-NG”

@echo off

 SET input=%1
 FOR /f "tokens=1,2,3 delims=:" %%a IN ("%input%") do SET host=%%b&SET port=%%c

 SET host=%host:~2%
 echo %host%
 echo %port%

 cd C:\MobaXterm\
 MobaXterm.exe -newtab "telnet -r %host% %port%:~0,-1%"
 sleep 6
 exit

Create a reg file, run it

Windows Registry Editor Version 5.00

 [HKEY_CURRENT_USER\SOFTWARE\Classes\MobaXterm.telnet]
 @="telnet"

 [HKEY_CURRENT_USER\SOFTWARE\Classes\MobaXterm.telnet\DefaultIcon]
 @="C:\\MobaXterm\\MobaXterm.exe, 0"

 [HKEY_CURRENT_USER\SOFTWARE\Classes\MobaXterm.telnet\shell]

 [HKEY_CURRENT_USER\SOFTWARE\Classes\MobaXterm.telnet\shell\open]

 [HKEY_CURRENT_USER\SOFTWARE\Classes\MobaXterm.telnet\shell\open\command]
 @="\"C:\\Program Files\\EVE-NG\\start_mobaxterm.bat\" %1"

 [HKEY_CURRENT_USER\SOFTWARE\MobaXterm]

 [HKEY_CURRENT_USER\SOFTWARE\MobaXterm\Capabilities]

 [HKEY_CURRENT_USER\SOFTWARE\MobaXterm\Capabilities\URLAssociations]
 "telnet"="MobaXterm.telnet"

 [HKEY_CURRENT_USER\SOFTWARE\RegisteredApplications]
 "MobaXterm"="Software\\MobaXterm\\Capabilities"

 [HKEY_CURRENT_USER\SOFTWARE\Classes\telnet\shell]

 [HKEY_CURRENT_USER\SOFTWARE\Classes\telnet\shell\open]

 [HKEY_CURRENT_USER\SOFTWARE\Classes\telnet\shell\open\command]
 @="\"C:\\Program Files\\EVE-NG\\start_mobaxterm.bat\" %1"

 [Computer\HKEY_CLASSES_ROOT\telnet\shell\open\command]
 @="\"C:\\Program Files\\EVE-NG\\start_mobaxterm.bat\" %1"

Reboot you computer

Then when you try to open the “telnet://” link, open with your “start_mobaxterm.bat”.

Leave a Comment

Your email address will not be published. Required fields are marked *