Windows PowerShell是一种基于.NET Framework的命令行shell和脚本环境,可以方便系统管理员将系统配置任务自动化。
InstallShield现在支持在Custom Action(简称:CA)中运行PowerShell脚本,见下图:
注意:在安装包中运行PowerShell的CA,必须确保Windows PowerShell已经安装在目标系统中。InstallShield已经预定义了在目标机判断是否安装了PowerShell的系统查找项,见下图:
PowerShell CA只支持Basic MSI 和 InstallScript MSI工程类型。
有关如何在Custom Action中运行PowerShell ,我们以后有机会再做详细介绍。