See how the msdn http://msdn.microsoft.com/en-us/library/aa767914.aspx works forProgramRegister a URL protocol
CoreCodeIs the Registry
Windows Registry Editor Version 5.00
[Hkey_classes_root \ alert]
@ = "Alterprotocol"
"URL protocol" = "C: \ alert.exe"
[Hkey_classes_root \ alert \ defaulticon]
@ = "C: \ alert.exe, 1"
[Hkey_classes_root \ alert \ shell]
[Hkey_classes_root \ alert \ shell \ open]
[Hkey_classes_root \ alert \ shell \ open \ command]
@ = "\" C: \ alert.exe \ "\" % 1 \""
Now we have registered an alert protocol for alert.exe. Enter alert: // hello in the IE address bar to start the alert.exe program of the customer.
See alert.exe code first:
Namespace Alert { Class Program { Static String Processinput ( String S ){ // Todo verify and validate the input // String as appropriate for your application. Return S ;} Static Void Main ( String [] ARGs) {console. writeline ( "Client program call" ); Console. writeline ( "Alert.exe parameters: \ r \ n" ); Console. writeline ( "Raw command-line: \ n \ t" + Environment. CommandLine); console. writeline ("\ N parameter: \ n" ); Foreach ( String S In ARGs) {console. writeline ( "\ T" + Processinput (s);} console. readkey ();}}}
If you enable the 360 web page firewall: The first time you run the firewall, the following prompt appears:
Allow.
If your C drive does not have alert.exe:
Running effect:
Attachment download: alert.rar