简体   繁体   English

链接到Start ClickOnce或MSI安装的应用程序

[英]Link to Start ClickOnce or MSI-Installed Application

An interesting requirement that came up for one of the applications I'm working on. 我正在开发的一个应用程序提出了一个有趣的要求。 We support both ClickOnce deployment for the majority of customers and traditional deployment with an MSI (WiX) package for those customers that require more control over the install process. 对于大多数客户,我们都支持ClickOnce部署,对于需要更多控制安装过程的客户,我们也支持MSI(WiX)包进行传统部署。

However, regardless of how the application is installed, when a user clicks the 'Launch' button on our website, I need it to launch the application. 但是,无论如何安装该应用程序,当用户单击我们网站上的“启动”按钮时,我都需要它来启动该应用程序。 If it's already been installed via the MSI package for the current user, it should launch the currently installed copy; 如果已经通过MSI软件包为当前用户安装了它,则它应该启动当前安装的副本;否则,它将启动当前副本。 otherwise, it should install/update/run the ClickOnce package. 否则,它应该安装/更新/运行ClickOnce软件包。 I suppose I could make the ClickOnce version launch the MSI-installed version if it's present, then quickly close. 我想我可以使ClickOnce版本启动MSI安装的版本(如果存在),然后快速关闭。 This question gives me hope that it might be possible by simply making both applications have the same GUID, but I'm not sure how to do that, or if it's even a good idea. 这个问题使我希望通过简单地使两个应用程序具有相同的GUID可以实现,但是我不确定如何做到这一点,或者这是否是个好主意。

It's trivial to make a link that launches the ClickOnce application: 创建链接以启动ClickOnce应用程序很简单:

<a href="/path/to/myapp.application">Launch</a>

And it's not too difficult to make a custom protocol handler that gets registered with the MSI: 并且,使自定义协议处理程序注册到MSI并不难:

<a href="myapp:launch">Launch</a>

However it doesn't seem possible to make the ClickOnce application be able to handle this new protocol, and even if I solve that problem, this won't work for new customers that don't have either installed. 但是, 似乎无法使ClickOnce应用程序能够处理此新协议,即使我解决了该问题,这也不适用于既未安装又未安装新客户的情况。

Is there a relatively simple way to make a single web link that will launch an MSI-installed application or a ClickOnce application? 是否有相对简单的方法来制作单个Web链接,以启动安装了MSI的应用程序 ClickOnce应用程序?

I've used this technique from a Silverlight application to invoke a local application. 我从Silverlight应用程序中使用了此技术来调用本地应用程序。 We had to sign the XAP and get it trusted for it to work though. 但是,我们必须签署XAP并获得它的信任才能使其正常工作。 I'm not sure how it would work from a normal HTML page. 我不确定正常的HTML页面如何工作。

Registering an Application to a URI Scheme 将应用程序注册到URI方案

I think you're going about it backwards. 我认为您正在倒退。 If you want to invoke the ClickOnce app (check for updates and run the app), you can do a process.start(ieexplore.exe, " http://myserver.mydomain.com/myapplication/whatever/myapp.application ") (using the URL to the actual ClickOnce app). 如果要调用ClickOnce应用程序(检查更新并运行该应用程序),则可以执行process.start(ieexplore.exe,“ http://myserver.mydomain.com/myapplication/whatever/myapp.application ”) (使用实际ClickOnce应用的URL)。 Rather than having the ClickOnce app invoke the msi, can you do it the other way around and have the msi invoke the ClickOnce app? 除了让ClickOnce应用程序调用msi之外,您还可以采用其他方法让msi调用ClickOnce应用程序吗? Or write something to check which one to run/install and invoke it? 还是写一些东西来检查哪个要运行/安装并调用?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何确定与ClickOnce一起安装的其他应用程序的位置? - How to determine location of a different application that was installed with ClickOnce? 启动脱机ClickOnce应用程序并等待退出 - Start an offline ClickOnce Application and wait for Exit 使用ClickOnce应用程序重新标记标题/开始菜单文件夹 - Rebranding title / Start menu folder with ClickOnce application ClickOnce应用程序无法通过与ClickOnce应用程序关联的* .abc的Process.Start(“x.abc”)启动 - ClickOnce application does not start through Process.Start(“x.abc”) with *.abc associated to the ClickOnce application ClickOnce .appref-ms 不仅仅是指向 .application 文件的链接? - ClickOnce .appref-ms more than a link to .application file? .NET部署(ClickOnce或MSI)客户端设置/参数 - .NET Deployment (ClickOnce or MSI) Client Settings/Parameters ClickOnce开始菜单图标 - ClickOnce start menu icon ClickOnce发布了一个从网络安装的应用程序,每次运行它时都会显示烦人的“启动应用程序”窗口 - ClickOnce published an application installed from web showing annoying “Launching Application” window every time I run it 从ClickOnce迁移到MSI部署的策略 - Strategy for moving from ClickOnce to MSI deployment 如果未安装MSMQ,防止应用程序启动失败 - Prevent application start fail if MSMQ not installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM