cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
herbertkoelman
Level 4

Is it possible to let a powershell action script abort an installation

Jump to solution

Is it possible to let a powershell script abort an installation ?

Labels (1)
0 Kudos
(1) Solution
Varaprasad
Level 7 Flexeran
Level 7 Flexeran

I am not sure about clear requirement here. These are my recommendations at this point.

  1. Return error code (non zero) using exit method from your powershell custom action as below. You can refer msi  error codes https://docs.microsoft.com/en-in/windows/win32/msi/error-codes

    exit(1603)

  2. You can also set property from powershell and use it to exit based on condition checks like sequencing built-in Error type custom action

    set-property -name NEWPROPERTY -value $Value

View solution in original post

0 Kudos
(1) Reply
Varaprasad
Level 7 Flexeran
Level 7 Flexeran

I am not sure about clear requirement here. These are my recommendations at this point.

  1. Return error code (non zero) using exit method from your powershell custom action as below. You can refer msi  error codes https://docs.microsoft.com/en-in/windows/win32/msi/error-codes

    exit(1603)

  2. You can also set property from powershell and use it to exit based on condition checks like sequencing built-in Error type custom action

    set-property -name NEWPROPERTY -value $Value
0 Kudos