指向已安装的ClickOnce应用程序的路径是什么? [英] What is the path to an installed ClickOnce application?

查看:1492
本文介绍了指向已安装的ClickOnce应用程序的路径是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个Hallo world类型 Windows Forms 应用程序在C#中测试身份验证问题。我将定期从服务器运行最终的应用程序,所以我想确保我可以获得资源,并在提交到整个应用程序之前修复。



所以,在Visual Studio 2010中,我选择发布...。



它说在哪里,我在共享文件系统上指定一个文件夹。



它说你的用户将如何安装,我说URL或类似的东西。



它说在哪里,我给它一个URL在同一共享文件系统,不同的文件夹。



所有是正确的世界....



现在,通过在我发布应用程序的共享文件系统上双击setup,我将其安装在我的服务器上。



现在,我在开始菜单中找到一个快捷方式,一切都很好。



现在,我想设置它,使SQL Server代理定期执行并测试身份验证...)所以,我给它执行的URL是什么?我一直在尝试一切,但不会这么好。我不太明白发布方法....



如何解决这个问题?

解决方案

查看已安装应用程序的开始菜单快捷方式,您会看到它指向一个ClickOnce应用程序参考(.appref-ms)文件深埋在您的用户文件夹中。您可以通过执行该文件来启动应用程序。



示例:

  Process.Start(@C:\Users\Igby\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft\MyClickOnceApp.appref-ms); 

我不知道任何关于SQL Server代理,但尝试给它这个路径。 >

I wrote a "Hallo world" type Windows Forms application in C# to test authentication issues. I'm going to be running the eventual application from a server periodically, so I want to be sure I can get to the resources, and fix that before committing to the whole application.

So, in Visual Studio 2010, I choose Publish....

It says "Where?", and I specify a folder on a shared file system.

It says "How will your users install", and I say, "URL" or something like that.

It says "Where", and I give it a URL in the same shared file system, different folder.

All is right with the world....

Now, I install it on my server by double-clicking "setup" on the shared file system where I published the application.

Now, I find a shortcut in my start menu, all good.

Now, I want to set it up so SQL Server Agent executes it periodically (and tests authentication...) so, what is the URL I give it to execute? I've been trying everything, but not going so well. I don't understand the publish method much at all....

How can I fix this problem?

解决方案

Look at the Start menu shortcut for your installed application and you'll see that it points to a "ClickOnce Application Reference" (.appref-ms) file buried deep within your user folder. You can start the application by executing that file.

Example:

Process.Start(@"C:\Users\Igby\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft\MyClickOnceApp.appref-ms");

I don't know anything about SQL Server Agent, but try giving it this path.

这篇关于指向已安装的ClickOnce应用程序的路径是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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