Community discussions

MikroTik App
 
Sayrax
just joined
Topic Author
Posts: 24
Joined: Mon Jun 26, 2017 4:44 pm
Location: Kharkiv
Contact:

URI WinBOX

Thu Nov 21, 2019 9:28 pm

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?
You do not have the required permissions to view the files attached to this post.
 
r00t
Long time Member
Long time Member
Posts: 674
Joined: Tue Nov 28, 2017 2:14 am

Re: URI WinBOX

Thu Nov 21, 2019 11:54 pm

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".
 
Sayrax
just joined
Topic Author
Posts: 24
Joined: Mon Jun 26, 2017 4:44 pm
Location: Kharkiv
Contact:

Re: URI WinBOX

Fri Nov 22, 2019 9:19 am

I understand. But can you do without an intermediary?