divyaniP
Posts: 16
Joined: Mon Dec 21, 2020 1:15 pm

Powershell script exeption catch in custom action

Tue Apr 27, 2021 6:50 am

I have used Powershell Script Inline Custom Action.

I have used the commands :
ConvertTo-SecureString
[Runtime.InteropServices.Marshal]::SecureStringToBSTR
[Runtime.InteropServices.Marshal]::PtrToStringAuto

How can I catch the exception thrown by these commands?

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Powershell script exeption catch in custom action

Tue Apr 27, 2021 1:01 pm

Hello,

Please note that we are not PowerShell experts by any means.

You can, however, try to solve your problem by using the following article:

About Try Catch Finally

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”