“用户的应用程序数据文件夹”;是否可以在SpecialFolder.ApplicationData和SpecialFolder.LocalApplicationData之间强制 [英] "User's Application Data Folder"; Is it possible to force between SpecialFolder.ApplicationData and SpecialFolder.LocalApplicationData

查看:73
本文介绍了“用户的应用程序数据文件夹”;是否可以在SpecialFolder.ApplicationData和SpecialFolder.LocalApplicationData之间强制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要以普通特权运行的应用程序。因此,它将安装在Environment.SpecialFolder.ProgramFiles中,但是将conf / logging / history详细信息存储在Environment.SpecialFolder.LocalApplicationData中。

I have an application that needs to run at normal privileges. So it gets installed in Environment.SpecialFolder.ProgramFiles, but stores conf/logging/history details in Environment.SpecialFolder.LocalApplicationData.

问题在于在Setup / Deploy中项目,在文件系统部分中,我无法区分ApplicationData(漫游)或LocalApplicationData,仅区分用户的应用程序数据文件夹,这可以取决于谁将其安装在什么计算机上。

The problem is that in the Setup/Deploy project, in the File System section I don't get to distinguish between ApplicationData (roaming) or LocalApplicationData, only "User's Application Data Folder," which could be either depending who installs it on what machine.

是否可以强制用户的应用程序数据为另一个?

Is it possible to force "User's Application Data" to be one or the other?

推荐答案

MSI 确实支持本地应用程序数据文件夹。如果您正在谈论安装和部署项目,则可能需要切换到其他安装程序框架,例如 WiX 。 (无论如何,Visual Studio 2012中都不再存在安装和部署)。 WiX有一个名为黑暗的工具,该工具会将MSI转换为WiX XML文件,因此您可以可以简单地对其进行编辑或将它们添加到它们中,而又方便又快捷。

MSI does support local application data folder. If you're talking about a Setup and Deployment project, maybe switching to another installer framework like WiX might be in order. (Setup and Deployment no longer exists in Visual Studio 2012 anyway). WiX has a tool called Dark that will convert an MSI to WiX XML files so you can simply edit them or add to them quickly and easily.

这篇关于“用户的应用程序数据文件夹”;是否可以在SpecialFolder.ApplicationData和SpecialFolder.LocalApplicationData之间强制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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