Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I need built project alow user run app from web with metro IU. When user click icon from web site, the program will call app (eg calc.exe or filename.exe).

Now i using tool webrunapps from http://www.webrunapps.com/[^

Thanhk you verymuch !!
Posted
Comments
CHill60 22-Apr-15 9:47am    
What is your question?
Dave Kreskowiak 22-Apr-15 10:25am    
If you're already using WebRun, what's the question? If you've got questions specifically about the functionality of WebRun, contact those people about them. It's their product you're using and they support it.

1 solution

Hello.

This is how I would do this. It is fairly simple and works well.

First you need to write a console app or what ever to register an application to a URI scheme. This can be part of your installation program (I guess this is what WebRunApp does).

For example this is how you would register notepad:
C#
var key = Registry.ClassesRoot.CreateSubKey("customProtocol", RegistryKeyPermissionCheck.ReadWriteSubTree);
 key.SetValue(string.Empty, "URL:customProtocol Protocol");
 key.SetValue("URL Protocol", string.Empty);

 key = key.CreateSubKey(@"shell\open\command");
 string exe = @"c:\windows\system32\notepad.exe";
 key.SetValue(string.Empty, exe + " " + "%1");


Once this is done you can use that in a webpage, here is an example firing up notepad and your email client:


XML
<!DOCTYPE html>
<html>
<body>
<a href="mailto:">Click here to mail</a>
<br/>
<a href="customProtocol:">Click here for notepad</a>
</body>
</html>


It's that simple. Enjoy :)

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