How to pass argument through custom url to an application

前端 未结 1 551
轻奢々
轻奢々 2021-01-26 04:52

I am using windows 7 I want to pass filename as argument which I want to open through custom url. I followed link http://msdn.microsoft.com/en-us/library/aa767

相关标签:
1条回答
  • 2021-01-26 05:26

    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...

    0 讨论(0)
提交回复
热议问题