Is there a Property that resolves to the public folder? I don't want to hard code "c:\users\public" in the Directory structure, obviously, but I can't find a predefined Property that resolves to this. Is there an accepted way of specifying files to be installed here and/or removed on uninstall?
是否存在解析为公用文件夹的属性?我不想在目录结构中硬编码“c:\ users \ public”,但是我找不到解决这个问题的预定义属性。是否有可接受的方法来指定要在此处安装和/或在卸载时删除的文件?
2 个解决方案
#1
If there is a CSIDL for the directory then the OSInfo CustomActions probably have it. That's an extension to the properties supported by Windows Installer. There isn't support for the Vista only RefKnownFolder(), yet.
如果目录有CSIDL,则OSInfo CustomActions可能拥有它。这是Windows Installer支持的属性的扩展。目前尚不支持Vista的RefKnownFolder()。
#2
When you target your setup to be for all users then some folders will me mapped to the all users folder (DesktopFolder, StartMenuFolder, ProgramMenuFolder, more info here) but there is no permanent property that will point to the all users folders on all types of setups.
当您将设置定位为适用于所有用户时,我将某些文件夹映射到所有用户文件夹(DesktopFolder,StartMenuFolder,ProgramMenuFolder,此处有更多信息),但没有永久属性指向所有类型的所有用户文件夹设置。
You can use the CommonAppDataFolder which is where you should put data that will be relevant to all users of the application (but it requires admin right to modify).
您可以使用CommonAppDataFolder,您应该放置与应用程序的所有用户相关的数据(但需要管理员权限才能修改)。
You can try to write a custom action (Sample here) that will replace the value of [YourFolder] with [%PUBLIC] (The Public environment variable, I don't know if it exits on XP and down)
您可以尝试编写一个自定义操作(此处为示例),它将[YourPolIC]的值替换为[%PUBLIC](公共环境变量,我不知道它是否在XP上退出)
#1
If there is a CSIDL for the directory then the OSInfo CustomActions probably have it. That's an extension to the properties supported by Windows Installer. There isn't support for the Vista only RefKnownFolder(), yet.
如果目录有CSIDL,则OSInfo CustomActions可能拥有它。这是Windows Installer支持的属性的扩展。目前尚不支持Vista的RefKnownFolder()。
#2
When you target your setup to be for all users then some folders will me mapped to the all users folder (DesktopFolder, StartMenuFolder, ProgramMenuFolder, more info here) but there is no permanent property that will point to the all users folders on all types of setups.
当您将设置定位为适用于所有用户时,我将某些文件夹映射到所有用户文件夹(DesktopFolder,StartMenuFolder,ProgramMenuFolder,此处有更多信息),但没有永久属性指向所有类型的所有用户文件夹设置。
You can use the CommonAppDataFolder which is where you should put data that will be relevant to all users of the application (but it requires admin right to modify).
您可以使用CommonAppDataFolder,您应该放置与应用程序的所有用户相关的数据(但需要管理员权限才能修改)。
You can try to write a custom action (Sample here) that will replace the value of [YourFolder] with [%PUBLIC] (The Public environment variable, I don't know if it exits on XP and down)
您可以尝试编写一个自定义操作(此处为示例),它将[YourPolIC]的值替换为[%PUBLIC](公共环境变量,我不知道它是否在XP上退出)