在microtik Winbox的注册表编辑器中添加自定义协议
Adding Custom Protocol in Registry Editor for MikroTik Winbox
我有一个叫做Winbox的小windows应用程序(它是一个用来控制RouterBoard的小应用程序)。我们正在制作一个web应用程序,它需要制作一个自定义协议URL,如:
oxo://192.168.103.3 {USERNAME} {PASSWORD}
我只需要oxo://指向[c:/winbox.exe]并使用参数{IP ADDRESS} {USERNAME} {PASSWORD}执行应用程序
所以我编辑了一个注册表编辑器代码:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOToxo]
@=""URL:oxo Protocol""
"EditFlags"=hex:02,00,00,00
"URL Protocol"=""
[HKEY_CLASSES_ROOToxoDefaultIcon]
@=""C:\winbox.exe",0"
[HKEY_CLASSES_ROOToxoshell]
[HKEY_CLASSES_ROOToxoshellopen]
[HKEY_CLASSES_ROOToxoshellopencommand]
@=""C:\winbox.exe" "%1""
但是问题是当在浏览器中打开url时,它会在{IP ADDRESS}字段中显示"oxo://{IP ADDRESS}"。
我所需要的就是从最终的可执行路径
中删除协议名称"oxo://"的第一部分。如果想下载Winbox.exe:http://download2.mikrotik.com/winbox.exe
用法:
winbox.exe {IP ADDRESS} {USERNAME} {PASSWORD}
{IP ADDRESS} : Is the IP Address of the remote RouterBaord device.
{USERNAME} : Is the username of the RouterBoard Device.
{PASSWORD} : Is the password of the RouterBoard Device.
请我需要任何帮助与这个问题,即使它是在JAVA, C, c++或任何编程语言。
我只是想从web浏览器运行带有参数的exe文件。
很多谢谢,Areeb
你的链接包含动态参数,关键是要使oxo是打开控制台应用程序您可以在控制台应用程序中使用此代码将应用程序重定向到winbox.exe
Sub Main()
On Error Resume Next
Dim url As String = Command()
url = url.Replace("/", "")
url = url.Replace("oxo", "")
url = url.Replace(":", "")
Dim arg() As String = url.Split(",")
Dim IP As String = arg(2)
Dim Username As String = arg(1)
Dim Password As String = arg(0)
Shell("c:winboxwinbox.exe " & IP & " " & Username & " " & Password)
Console.WriteLine("Yout username : " & Username & " Password : " & Password & " Ip : " & IP)
End Sub
和你的链接将是
oxo://{PASSWORD},{USERNAME},{IP}
相关文章:
- 添加自定义析构函数时,Move 构造函数在派生类中消失
- 如何在自定义对象的<<运算符中添加自定义前缀
- 如何添加自定义关键字以 clang 格式被视为"class"?
- 为C /CLI中的所有请求添加自定义的标头到WebBrowser控件
- 如何使用 word 对象模型中的C++接口在 word 中添加自定义 XML 艺术
- 如何在Boost Graph库中的Grid_graph的边缘添加自定义属性
- 当我添加自定义比较器时,无法插入新元素以设置
- 如何在Tensorflow Lite中添加自定义运算符
- cmake 如何在项目的 vcxproj 属性组中添加自定义条目?
- C 添加自定义XML标签,用于序列化对向量
- 如何在QT中添加自定义应用程序
- 在运行时添加自定义Qwidget
- 如何在Qt中添加自定义类处理功能
- 我可以添加自定义 #pragma 规则吗?
- BOOST _CHECK_EQUAL(和dervatives)添加自定义消息
- 正在添加自定义邮件头
- 如何在Qt Creator项目向导中添加自定义构建步骤
- 在Visual Studio 2010中为项目添加自定义图标
- 如何在boost图中添加自定义边缘标签
- 在microtik Winbox的注册表编辑器中添加自定义协议