定义文件的安装位置 [英] Defining where files are installed

查看:91
本文介绍了定义文件的安装位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将.NET应用程序部署为ClickOnce应用程序,但是在定义应用程序的安装位置时遇到了麻烦。我需要知道这一点,因为我必须包括支持文件。我已经将支持文件添加为现有项目。我以为该程序将安装在程序文件中,但该文件不存在。相反,桌面上只有一个快捷方式。有人可以解释使用VS2012定义安装路径的方式/位置吗?

I am trying to deploy a .NET application as a ClickOnce Application, but I am having trouble defining where the application is installed. I need to know this because I have to include support files. I have already added the support files as "existing items". I had assumed that the program would install in Program Files, but it does not exist there. Instead, there is just a shortcut on the desktop. Can someone explain how/where the install path is defined using VS2012?

推荐答案

Clickonce 应用程序将安装在用户配置文件下,而不是程序文件路径下。

Clickonce application gets installed under the user profile, not the Program Files path.

在Windows Vista和Windows 7上,clickonce应用程序路径将位于<$ c中$ c> c:\users\用户名\AppData\Local\Apps\2.0\

On windows Vista and Windows 7, clickonce application path will be somewhere in c:\users\username\AppData\Local\Apps\2.0\

在Windows XP上,clickonce应用程序路径将位于 c:\文档和设置\用户名\LocalSettings\Apps\2.0\

On Windows XP, clickonce application path will be somewhere in c:\document and Settings\username\LocalSettings\Apps\2.0\

请注意,Clickonce应用程序路径在每次安装时都不同,我发现最好的方法是使您的应用程序将自己的应用程序路径写入reg键,这样您就可以准确知道应用程序路径在哪里看着reg。

Note that Clickonce application path is different everytime upon installation, I found the best way is to make your app to write its own app path to the reg key, this way you know exactly where the app path is by looking at the reg.

这篇关于定义文件的安装位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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