Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 25-Apr-16 3:28am

1 solution

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

See this for an explanation: windows - How to make a batch file execute a reg file - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900