Hello ITNINJA's , 
Been a really long time, eh? anyways. We have a strange requirement. The client end has asked us to make use of powershell scripts as custom action (God knows why). But since it has, we have to do so. Now , i understand , we can add powershell custom actions in ISM and then compile it to generate an MSI. But how do we add them in a MST? I tried the old age method of copying rows from ISM and pasting them in MST , but that doesnt work. Similar is the problem for KillProcess custom action that ships with new version of installshield. Any help in this regard will be appreciable. 

3 Comments   [ - ] Hide Comments


  • PowerShell Scripts is available in 'InstallShield 2013'
  • you can call powershell script from Custom Action 'new exe > stored in binary table'
    • I am quite surprised at your answer to be upfront. I very clearly mentioned in the Question, i m planning to Use Custom Action in the form of Powershell in my MST and not ISM
  • struggling with the same question since couple of weeks!!! Experts ideas would be much appreciated
Please log in to comment

Answer this question or Comment on this question for clarity



Add an EXE custom action > path referencing a directory(type 3106).

Source: (Directory property of PS1 file where it is getting installed)

Target: <command line> ("[SystemFolder]WindowsPowerShell\v1.0\Powershell.exe" -file "[#filekeyofPS1]")

I belive this will be a workaround close to "New powershell > Installed with product" option in ISM..

Answered 02/20/2014 by: karockiad
Orange Belt

  • if the below is what u meant by the syntax is custom action table.
    StopService 3106 [INSTALLDIR] "[System64Folder]WindowsPowerShell\v1.0\Powershell.exe" -file "[stopservice.ps1]"

    I tried installing my MSI MST with the above customization. the powershell still fails to do the task(in my case stop a service (not system service))
    • source should be without [] braces and hence it will be INSTALLDIR.. if "stopservice.ps1" is the file name then you should choose the respective value in first column(file column) in file table, say for eg it is "stopserviceps1". then the command line will be
      "[System64Folder]WindowsPowerShell\v1.0\Powershell.exe" -file "[#stopserviceps1]"

      that # sign should be there in the braces..
      • Here is how the entry should look. In Custom Action table
        Action Type Source Target
        RunScript 3106 V10(the folder structure that I created in DirectoryTable representing the location of powershell exe) powershell.exe -file "[INSTALLDIR]StopService.ps1"
Please log in to comment