This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- PowerShell Custom Actions Failing at Runtime
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
PowerShell Custom Actions Failing at Runtime
PowerShell Custom Actions Failing at Runtime
Summary
1603 Error occurs with a powershell custom action after upgrading to InstallShield 2015 or above.Synopsis
InstallShield allows you to create a powershell custom action and launch it from your installation. If you migrate an older project into InstallShield 2015 or above, your previously working powershell custom actions may now fail with a 1603 error. This knowledge base article will explain a possible cause as to why this behavior is occurring and how you can resolve it.Discussion
If your powershell script contains a Write-host command, this was ignored in previous versions of InstallShield. However in InstallShield 2015 and later, the Write-host call will cause an error since it is for hosts that support user interaction (...Basic MSI or Suite-hosted powershell scripts are not meant for user interaction, since both Basic MSI and Suite projects have their own preferred methods for user interaction).Workaround
If you can simply remove your calls to Write-host in your powershell script, this alone should resolve the error. However if you have a number of Write-host calls in your powershell script, then you can workaround this by overriding Write-Host with functions that do nothing. For example, this can be done once at the top of your powershell script...function Write-Host {}
# optionally others such as: function Write-Verbose { }
...
Write-Host "Blah" # does nothing
...
No ratings