给安装文件设定条件

1.在启动条件中添加启动条件,以注册表为例
a.“添加注册表搜索”
b.property 属性设TestRegedit
c.Regkey 属性设Software\Microsoft\vsto runtime Setup\v2.0.50727     
d.Root 属性设vsdrrHKLM
e.Value 属性设MSI
(以VS安装部署为例,输入自己要搜索的注册表信息)
2.选定应用程序文件夹中的文件,将其Condition属性设为TestRegedit或NOT TestRegedit
具体条件语句可参考下表

Item Syntax
value symbol | literal | integer
comparison-operator < | > | <= | >= | = | <>
term value | value comparison-operator value | ( expression )|
Boolean-factor term | NOT term
Boolean-term Boolean-factor | Boolean-factor AND term
expression Boolean-term | Boolean-term OR expression
symbol property | %environment-variable | $component-action | ?component-state | &feature-action | !feature-state
3.安装该文件,则根据 TestRegedit的返回值来判断该文件是否被安装。

你可能感兴趣的:(给安装文件设定条件)