为所有用户安装和数据访问 [英] Install for all users and data access

查看:101
本文介绍了为所有用户安装和数据访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是修改我的安装程序到我的exe文件和多个数据文件安装到所有用户可以访问的位置的最佳方式?我想任何XP / VISTA / Win7的用户有自己的开始菜单和桌面上的选项。一旦运行这个应用程序,他们需要能够做出更改写入几个数据文件与应用程序一起走的。我目前正在使用的用户配置文件漫游数据文件夹或类似的东西。

What's the best way to modify my installer application to install my exe and several data files into a location that all users can access? I want any XP/Vista/Win7 user to have the option on their start menu and desktop. Once they run this app, they need to be able to make write changes to a few of the data files that go along with the application. I currently am using the User Profile Roaming data folder or something like that.

推荐答案

首先,您需要更改您的安装类型,每-machine:

First you need to change your installation type to per-machine:


    在其属性
  • 选择在Solution Explorer安装项目

  • 窗格中设置的 InstallAllUsers

  • select your setup project in Solution Explorer
  • in its Properties pane set InstallAllUsers to True

在这之后,您可以配置默认安装文件夹:

After that, you can configure the default installation folder:


  • 去你的安装项目的文件系统编辑器

  • 选择应用程序文件夹

  • 窗格中设置的 DefaultLocation 为:

[ COMMONAPPDATAFOLDER] [生产企业] \ [产品名称]

在应用程序文件夹添加文件

add your files in Application Folder

您可以阅读更多关于COMMONAPPDATAFOLDER此处的 http://msdn.microsoft.com/en-us/library/windows/desktop/aa367992(v = vs.85)的.aspx

You can read more about CommonAppDataFolder here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa367992(v=vs.85).aspx

最后,在文件系统编辑器您可以在用户的桌面文件夹添加快捷方式。它采用 DesktopFolder 财产将被自动解析到所有用户桌面为每台机器安装。

Finally, in the File System Editor you can add your shortcuts in User's Desktop folder. It uses DesktopFolder property which is automatically resolved to the All Users desktop for a per-machine installation.

这篇关于为所有用户安装和数据访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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