当前用户的 MyDocuments,Wix 中的内置变量?
我需要将一些文件安装到C:\Documents and Settings\currentUser\SomeFolder
。 我找不到它的一些内置函数/变量。
有人可以帮助/告诉我
结构或我的问题的解决方案吗?
谢谢。
i need to install some file to C:\Documents and Settings\currentUser\SomeFolder
.
I can't find some buildin function/variable for it.
Can someone help/tell me the <DirectoryRef Id="TARGETDIR">
structure or the solution for my problem?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您确定要这样做吗?您将得到这样一种行为:每个登录并启动您的程序的用户都会尝试进行修复,如果找不到,则要求进行原始安装。此外,当您卸载时,您将无法清理所有用户配置文件。
许多人更喜欢“首次运行”模式,在该模式中,您将安装程序安装到 C:\Documents and Settings\All Users\,当您运行程序时,如果需要,它会将文件复制到当前用户配置文件(通常仅当您覆盖为所有用户设置的东西)。
否则,以下是 Windows Installer / WiX 系统文件夹属性中的可用目录列表
:
http://msdn.microsoft.com /en-us/library/aa370905(v=VS.85).aspx#system_folder_properties
您需要从
AppDataFolder
、LocalAppDataFolder
和中进行选择>CommonAppDataFolder
。First, are you sure that you want to do this? You will get a behavior where each user who logs in and starts up your program will attempt to do a repair and ask for the original install if not found. Also when you uninstall you won't be able to clean up all the users profiles.
Many people prefer the "first run" pattern where you have the installer install to C:\Documents and Settings\All Users\ and when you run your program it copies the files to the current user profile if needed ( usually only if you are overriding something that is set for all users ).
Otherwise, here is a list of available directories in Windows Installer / WiX
System Folder Properties:
http://msdn.microsoft.com/en-us/library/aa370905(v=VS.85).aspx#system_folder_properties
You'll want to choose from
AppDataFolder
,LocalAppDataFolder
andCommonAppDataFolder
.