To perform such activities. Still, there are times when I'll need to write my own custom action. The Windows Installer can execute a bunch of different custom action types. Here's a very simple PowerShell script to execute as an example:. Env:UserProfile} powershell.msi.test.log". First, we need to locate powershell.exe on the target system. We'll also include a launch condition to disallow installation if PowerShell is not installed on the target system. This application requires Windows PowerShell.