Page 1 of 1

URI WinBOX

Posted: Thu Nov 21, 2019 9:28 pm
by Sayrax
Good day! There is a problem in the absence of passing variables to winbox.

I registered the following in the registry
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\winbox]
"URL Protocol"=""
@="URL: winbox Protocol"
"BrowserFlags"=dword:00000008
"EditFlags"=dword:00000002
[HKEY_CLASSES_ROOT\winbox\DefaultIcon]
@="\"C:\\Tools\\MikroTik\\winbox.exe\",0"
[HKEY_CLASSES_ROOT\winbox\shell]
[HKEY_CLASSES_ROOT\winbox\shell\open]
[HKEY_CLASSES_ROOT\winbox\shell\open\command]
@="\"C:\\Tools\\MikroTik\\winbox.exe\" \"%1\""

but I can’t get rid of the protocol in the address bar. How can I get around this without a third-party handler?

Re: URI WinBOX

Posted: Thu Nov 21, 2019 11:54 pm
by r00t
You can use simple CMD/BAT file that extracts the IP and port from URI and launches the winbox:

Code: Select all

FOR /F "tokens=2 delims=/" %%a in ("%~1") DO start "winbox" winbox.exe %%a
running it as: test.bat "winbox://1.2.3.4:567/aaa" it starts "winbox.exe 1.2.3.4:567".

Re: URI WinBOX

Posted: Fri Nov 22, 2019 9:19 am
by Sayrax
I understand. But can you do without an intermediary?