用于在Windows注册表中注册和合并URL方案的批处理文件 [英] Batch file to register and merge URL scheme in windows registry

查看:187
本文介绍了用于在Windows注册表中注册和合并URL方案的批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想获得一些关于创建批处理文件执行的建议,URL方案将合并到Windows注册表(从Web应用程序执行exe)。



我尝试了什么:



我手动注册并添加,我希望批处理文件完成相同的工作,而不是手动要求用户这样做。

Would like to get some suggestions on creating a batch file executing which, a URL Scheme would get merged to Windows Registry (to execute an exe from web application).

What I have tried:

I have manually registered and added, I would like the same to be done by a batch file, instead of manually asking users to do.

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\alert]
@="ULR:alert Protocol"
"URL Protocol"="testPing"
[HKEY_CLASSES_ROOT\alert\Shell]
[HKEY_CLASSES_ROOT\alert\Shell\Open]
[HKEY_CLASSES_ROOT\alert\Shell\Open\Command]
@="\"Path\\Projects\\WMConsole\\WMConsole\\bin\\Debug\\Console.exe" \"%1\""



任何建议都会有很大帮助。

谢谢


Any suggestions would be of great help.
Thanks

推荐答案

你可以使用.reg f ile,像这样:

You could use a .reg file, something like this:
@echo off
rem  set __COMPAT_LAYER=RunAsInvoker
REGEDIT.EXE  /S  "%~dp0\file.reg"
pause



请参阅此说明: windows - 如何使批处理文件执行reg文件 - Stack Overflow [ ^ ]


这篇关于用于在Windows注册表中注册和合并URL方案的批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆