应用程序运行往往有一些环境依赖,所以我们会在安装包中设置安装条件,满足条件的情况下才继续安装,否则提示用户并退出安装。
 
在InstallScript MSI和Basic MSI工程中,我们可以在Project Assistant的Installation Requirements设置界面中, 通过左上角的Create a custom software condition来添加。
1. 设置查找项,我们选择Registry entry
InstallShield工程中System Search的使用注意事项 _休闲 
2. 设置注册表键值等内容,这里我们在Local Machine下查找,键为:SOFTWARE\Kevin Wan\System Search Wizard,键值为InstalledPath
InstallShield工程中System Search的使用注意事项 _休闲_02
这一步需要注意:注册表键 SOFTWARE\Kevin Wan\System Search Wizard 下如果InstalledPath键值为空,则认为Search条件没有满足。
 
3. 选择如果找到,安装将继续,并添加如果没有找到的提示文字,对于多语言安装包,大家还可以去String Editor中查找。之后点击Finish结束设置。
InstallShield工程中System Search的使用注意事项 _Installshield_03
 
 
转自Kevin Wan博客,更多Installshield打包技术交流问题可查看Appinstall论坛(www.appinstall.cn)