Sunday, 5 August 2012
Support for PowerShell Custom Actions - InstallShield 2012 Spring
Windows PowerShell is a .NET Framework–based command-line shell and script language that enables system administrators to automate system configuration tasks. InstallShield now has support for custom actions that run PowerShell scripts. You may want to add this type of custom action to a project to perform system configuration tasks at installation run time.
In order for an installation to run a PowerShell custom action, Windows PowerShell must be installed on target systems. InstallShield includes a new predefined PowerShell system search that checks for the presence of PowerShell on target systems. You can include this system search in your project and configure your PowerShell custom action to run only if the system search determines that PowerShell is installed.
The PowerShell execution policy, which determines whether PowerShell scripts can be run on a target system, is set to restricted by default, which does not permit PowerShell scripts to be run. If you want your installation to override the target system’s execution policy with an appropriate one for your installation’s PowerShell custom actions, you can use the new Windows Installer property IS_PS_EXECUTIONPOLICY to indicate the appropriate execution policy.