首页
学习
活动
专区
工具
TVP
发布
您找到你想要的搜索结果了吗?
是的
没有找到

WPF使用URL协议实现网页中打开应用

常见方案 网页唤起指定软件,其实就是利用URL来执行一个关键字Key,这个Key是注册表中的一个键,Value是指定路径的exe,亦可携带参数启动exe; 步骤1 检查关键字是否已存在 //检查注册表是否已包含...= null) { executablePath = registryRunKey.GetValue("URL Protocol") as string; registryRunKey.Close...{ commandKey.SetValue("", "\"" + value + "\"" + " \"%1\""); } fKey .SetValue("URL...a=arg1&e=arg2">点击打开MyApp.exe 步骤4 软件启动时解析参数 //此处会获取到步骤2中设置的Value;和步骤3中的href;参数自行解析 var args = Environment.GetCommandLineArgs...(); REG 保存为Notepad2.reg Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Notepad2] "URL Protocol

94921
领券