How to pass argument through custom url to an application

雨燕双飞 提交于 2019-12-02 04:39:57

Your registry code and screenprint are not the same: 'cultest.exe' and 'curlargu.exe'.

And you have used the HKEY_LOCAL_MACHINE instead of HKEY_CLASSES_ROOT. They point to the same, but it might make a difference. If cultest.exe is your program in the mentioned folder, then this registry code should work. Your browser URL call is correct.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\cultest]
@="URL:cultest Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\cultest\DefaultIcon]
@="D:\\Test\\argument\\dist\\cultest.exe,0"

[HKEY_CLASSES_ROOT\cultest\shell]

[HKEY_CLASSES_ROOT\cultest\shell\open]

[HKEY_CLASSES_ROOT\cultest\shell\open\command]
@="D:\\Test\\argument\\dist\\cultest.exe \"%1\""

I used the same REG-file today for my own program and it is working. I noticed some minor differences in the slashes...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!