im软件但凡要从web直接启动桌面客户端都是通过注册自己的协议来实现的,如果你已经安装了qq,你们 直接在浏览器的地址栏里输入:qq:// 就可以启动qq; 如果你安装了uc,那么直接在浏览器的地址栏里输入: uc:// 就可以直接启动uc了,当然处于安全考虑,可能会有提示的,因为你要从浏览器中跳出来去做其它浏览器无法控制的事情; 所以如果你在开始=>运行 里,输入: qq:// 或 uc:// 就不会提示,而是直接启动qq或uc了,这里也顺便给出了启动qq或uc的另类方法,如果你找不到qq或uc的快捷方式,或者找起来很麻烦,就可以这么搞 了。下面还是赶快进入正题吧:
既然qq:// uc://都是一种协议,那么就可以按照http或https来修改了,开始=> 运行=> regedit
然后查找https 全字匹配,只查找“项”(这样会快而且精确),然后将https部分导出成reg文件,内容大致如下:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT/https]
@="Safari URL"
"EditFlags"=dword:00000002
"URL Protocol"=""
[HKEY_CLASSES_ROOT/https/DefaultIcon]
@=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,/
00,69,00,6c,00,65,00,73,00,5c,00,53,00,61,00,66,00,61,00,72,00,69,00,5c,00,/
53,00,61,00,66,00,61,00,72,00,69,00,2e,00,65,00,78,00,65,00,2c,00,31,00,00,/
00
[HKEY_CLASSES_ROOT/https/shell]
[HKEY_CLASSES_ROOT/https/shell/open]
[HKEY_CLASSES_ROOT/https/shell/open/command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,/
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,61,00,66,00,61,00,72,00,69,00,/
5c,00,53,00,61,00,66,00,61,00,72,00,69,00,2e,00,65,00,78,00,65,00,22,00,20,/
00,2d,00,75,00,72,00,6c,00,20,00,22,00,25,00,31,00,22,00,00,00
[HKEY_CLASSES_ROOT/https]
@="Safari URL"
"EditFlags"=dword:00000002
"URL Protocol"=""
[HKEY_CLASSES_ROOT/https/DefaultIcon]
@=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,/
00,69,00,6c,00,65,00,73,00,5c,00,53,00,61,00,66,00,61,00,72,00,69,00,5c,00,/
53,00,61,00,66,00,61,00,72,00,69,00,2e,00,65,00,78,00,65,00,2c,00,31,00,00,/
00
[HKEY_CLASSES_ROOT/https/shell]
[HKEY_CLASSES_ROOT/https/shell/open]
[HKEY_CLASSES_ROOT/https/shell/open/command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,/
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,61,00,66,00,61,00,72,00,69,00,/
5c,00,53,00,61,00,66,00,61,00,72,00,69,00,2e,00,65,00,78,00,65,00,22,00,20,/
00,2d,00,75,00,72,00,6c,00,20,00,22,00,25,00,31,00,22,00,00,00
编辑reg文件:
去掉不需要的东西,把https替换成shagua(如果你愿意,可以随便起名字),把command部分替换成自己想要执行的应用程序,大致如下:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT/shagua]
@="这里随便"
"EditFlags"=dword:00000002
"URL Protocol"=""
[HKEY_CLASSES_ROOT/shagua/shell]
[HKEY_CLASSES_ROOT/shagua/shell/open]
[HKEY_CLASSES_ROOT/shagua/shell/open/command]
@="/"应用程序名/" /"%1/""
[HKEY_CLASSES_ROOT/shagua]
@="这里随便"
"EditFlags"=dword:00000002
"URL Protocol"=""
[HKEY_CLASSES_ROOT/shagua/shell]
[HKEY_CLASSES_ROOT/shagua/shell/open]
[HKEY_CLASSES_ROOT/shagua/shell/open/command]
@="/"应用程序名/" /"%1/""
保存该文件,双击执行,傻瓜协议就注册完了,在浏览器的地址栏里输入:
shagua://
这时就可以启动你的应用程序了
就这么简单?这只是入门,还有更多,要学会自己研究哦:)