.NET的Environment.SpecialFolder.ApplicationData的WiX等效项是什么? [英] What is the WiX equivilent of Environment.SpecialFolder.ApplicationData from .NET?

查看:79
本文介绍了.NET的Environment.SpecialFolder.ApplicationData的WiX等效项是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将文件安装到Environment.SpecialFolder.ApplicationData文件夹中,这在XP和Vista中有所不同.是否有内置的方式在WiX中引用正确的文件夹,还是我必须对OS使用条件检查并手动进行?

I need to install a file into the Environment.SpecialFolder.ApplicationData folder, which differs between XP and Vista. Is there a built in way to reference the correct folder in WiX or will I have to use conditional checks for OS and do it manually?

如果必须执行后者,如何在Vista中引用当前Windows用户的目录?

If I have to do the latter, how do I reference the current windows user's directory in Vista?

推荐答案

使用ID设置为

这将导致将test1.txt安装到Windows 7上的C:\ Users \ 用户名 \ AppData \ Roaming \ My以及C:\ Documents and Settings \ 用户名 \ Application Data \ My.

This will result in test1.txt being installed to C:\Users\username\AppData\Roaming\My on Windows 7 and to C:\Documents and Settings\username\Application Data\My on Windows XP.

MSDN具有属性列表可用于引用特殊文件夹.

MSDN has a list of properties that you can use to reference special folders.

这篇关于.NET的Environment.SpecialFolder.ApplicationData的WiX等效项是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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