我如何做代码项目从客户端发布应用程序使用Web浏览器像工具Webrun [英] How I Do Code Project To Lauch App From Client Throught Web Browser Like Tool Webrun

查看:69
本文介绍了我如何做代码项目从客户端发布应用程序使用Web浏览器像工具Webrun的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Metro IU从web建立项目alow用户运行应用程序。当用户从网站点击图标时,程序将调用app(例如calc.exe或filename.exe)。



现在我使用工具webrunapps来自http://www.webrunapps.com/ [ ^



Thanhk你很多!!

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

推荐答案

你好。



我就是这样做的。它非常简单并且运行良好。



首先,您需要编写一个控制台应用程序或者将应用程序注册到URI方案。这可能是你的安装程序的一部分(我想这就是WebRunApp所做的)。



例如,你可以注册记事本:

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


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





就这么简单。享受:)



Valery。



It's that simple. Enjoy :)

Valery.


这篇关于我如何做代码项目从客户端发布应用程序使用Web浏览器像工具Webrun的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆