windows - Passing arguments while launching program from browser -
i trying launch application (.exe) browser.
the specific app needs 4 arguments/parameters when launching, are: firstname, lastname, id, info
is there way add these arguments on internet explorer address bar when launch program?
i mean this:
"myapp:// -firstname -lastname -id -info"
(i managed add arguments straight windows registry, worked way. thats no help... need them inputted when launching app )
i have added windows registry:
[hkey_classes_root\myapp] @="url:myprogram protocol" "url protocol"="" [hkey_classes_root\myapp\defaulticon] @="\"c:\\myapp.exe\"" [hkey_classes_root\myapp\shell] [hkey_classes_root\myapp\shell\open] [hkey_classes_root\vsa\shell\open\command] @="\"c:\\myapp\" "%1"
thanks already! hope knows how fix this... :)
ps. im using windows 7 64 bit , internet explorer 10.
you cannot pass multiple command line arguments application (unless they're listed explicitly in registry you've shown).
instead, must code application's executable able process application protocol url string. code invoked browser so:
c:\apps\myapp.exe "myapp:myparam?myparam2&myparam3&myparam4"
the executable must able process string , handle appropriately. must take care avoid security holes in parsing of string, webpage exploit hole here escape browser sandbox , attack user's system.
there's more information on application protocols in post: http://blogs.msdn.com/b/ieinternals/archive/2011/07/14/url-protocols-application-protocols-and-asynchronous-pluggable-protocols-oh-my.aspx
Comments
Post a Comment