惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

博客园 - greystar

LightSwitch OOB发布模式下 Title的处理 个性化lightswitch登录屏幕(附源码) LightSwitch登录界面如何设置背景 LightSwitch学习阶段疑难问答 使用 OfficeIntegration.Word 实现lightswitch导出WORD的功能(续) 使用 OfficeIntegration.Word 实现lightswitch导出WORD的功能 lightswitch如何实现文件批量上传功能 lightswitch自定义扩展实现示例教程 devexpress套餐中UploadControl实现自定义参数传递的例子 lightswitch中自动完成框与查询参数的联动效果 如何在LightSwitch中创建多栏自动完成的下拉框 自定义lightswitch主屏幕 SQL Server 2008中的MERGE(不仅仅是合并) 一段XSLT转换XML节点名的测试代码 SL相关的感想 使用LINQ取得已选中的CheckBox Batch Updating in Entity Framework 路径标记语法 邮件合并中图片字段的处理
利用Register protocol实现网页调用桌面程序
greystar · 2010-12-09 · via 博客园 - greystar

腾讯官方通过 Tencent://Message/协议可以让QQ用户显示QQ/TM的在线状态发布在互联网上。这是一个典型的案例。

下面我们自己来实现这样的需求:

具体原理可参照如下:http://msdn.microsoft.com/en-us/library/Aa767914.aspx

要实现如上功能,最主要的还是对注册表的处理。新建一个注册表文件

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT/FinstoneRpt]
@="FRptProtocol"
"URL Protocol"="I://Release//CZBYReport.exe"
 
[HKEY_CLASSES_ROOT/FinstoneRpt/DefaultIcon]
@="I://Release//CZBYReport.exe,0"
 
[HKEY_CLASSES_ROOT/FinstoneRpt/shell]
 
[HKEY_CLASSES_ROOT/FinstoneRpt/shell/open]
 
[HKEY_CLASSES_ROOT/FinstoneRpt/shell/open/command]
@="/"I://Release//CZBYReport.exe/" /"%1/""

以上定义了协议名:FinstoneRpt,及相关调用处理程序的位置。各位可自行调整。将上述内容导入到注册表中,然后在相关网页里加上一个连接<a href="FinstoneRpt://message/?id=3e5065a6-19a0-41e6-afab-db7cc4bd3c76">test</a>,当点击时,则会调用注册表中记录的程序。当然该程序可以接受参数:就是href里的所有内容。可根据情况自行判断处理。

如需通过VS的安装程序实现安装时自动执行以上操作。在安装程序里,导入上述注册表文件,因为用户安装时的路径不一样,要定位注册表中记录的程序,只需在VS里将相关注册键值修改:

将涉及具体地址都一一改成[TARGETDIR]程序名,即可。