Wix 在运行时有条件地设置环境变量
Wix Set an Environment Variable Conditionally at Runtime
我使用的是 Wix 3.8,我需要检查是否在运行时设置了环境变量 - 如果没有,我需要进行设置。如果是,我不能覆盖现有值。
据我所知,Wix 提供了语句和条件预处理器指令。前者似乎用于 "read only" 类型检查,因为该元素没有符合条件的子元素,例如 .后者仅在构建时运行。
我还有其他选择吗,或者我必须使用自定义操作来执行此操作吗?提前致谢!
根据docs,你应该指定一个action=create
create
Creates the environment variable if it does not exist, then set it during installation. This has no effect on the value of the
environment variable if it already exists
我使用的是 Wix 3.8,我需要检查是否在运行时设置了环境变量 - 如果没有,我需要进行设置。如果是,我不能覆盖现有值。
据我所知,Wix 提供了语句和条件预处理器指令。前者似乎用于 "read only" 类型检查,因为该元素没有符合条件的子元素,例如 .后者仅在构建时运行。
我还有其他选择吗,或者我必须使用自定义操作来执行此操作吗?提前致谢!
根据docs,你应该指定一个action=create
create
Creates the environment variable if it does not exist, then set it during installation. This has no effect on the value of the
environment variable if it already exists