一个人怎么通过命令行参数ClickOnce应用程序? [英] How does one pass command line argument to a ClickOnce application?

查看:583
本文介绍了一个人怎么通过命令行参数ClickOnce应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从开始菜单(本地)推出了ClickOnce应用程序。我希望能够指定一个参数,以便应用程序可以加载某些数据。该应用程序住在一个文件共享,并使用URL只有一次(如这里描述推出在MSDN )。这意味着,在这个环节将无法正常工作的方法描述;用户将推出使用开始菜单的。preF-MS快捷键的应用程序。

I have a Clickonce application that is launched from the start menu (local). I would like to be able to specify a parameter so that the application can load certain data. The application lives on a fileshare and will be launched using the URL only once (like described here on MSDN). This implies that the method describe in this link will not work; users will be launching the application using an .appref-ms shortcut in the Start Menu.

我一直没能找到解决的办法。是否有可能以某种方式传递参数到点击一次应用程序?如果是这样,怎么样?如果不是,都有些什么办法?

I haven't been able to find a solution. Is it possible to somehow pass a parameter into the click once application? If so, how? If not, what are some alternatives?

推荐答案

既然你通过一个URL部署清单,你可以通过所有通过查询字符串信息(如 HTTP:/ /clickonce.example.com/shell.application?p1=this&p2=that

Since you get to the deployment manifest via a Url, you can pass all of that information via the query string (e.g. http://clickonce.example.com/shell.application?p1=this&p2=that)

我要输入的工作步骤,然后用Google搜索,发现的这个博客,基本上列出了所有的步骤。我已经做了一个类似的例子,没有问题的东西。唯一稍微困难的事情是,你必须重新设置法师事情后,但如果你把它部署在首位,你已经知道如何设置的事情了。

I was going to type out the steps, then googled and found this blog that basically lists out all the steps. I've done something similar in one instance with no issues. The only slightly difficult thing is that you have to re-mage after setting things up, but if you got it to deploy in the first place, you already know how to set things up.

祝你好运!

这篇关于一个人怎么通过命令行参数ClickOnce应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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