cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
LucasMarchi
Level 3

Custom Action

Jump to solution

Hello,

I'm trying to create a custom action, but everything I tried didn't work, the last one I tried was to start a PowerShell, open the notepad, but as much as I tried, I couldn't.

I ask, what must a custom action have to work? Why start a Powershell, for example?

Labels (1)
0 Kudos
(1) Solution

Hello @LucasMarchi,

Thank you for your reply.

Could you please open a case with our Support Team?

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

View solution in original post

0 Kudos
(3) Replies
Revenera_Ian
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @LucasMarchi,

Thank you for your post.

Here is a link to our documentation about calling a PowerShell custom action:

https://docs.revenera.com/installshield27helplib/helplibrary/CAPowerShell.htm

If you haven't, please take a look.

Generally speaking, an Immediate custom action (you have In-Script Execution set to Immediate Execution so it's an immediate custom action) does not make system changes and is scheduled before the standard Windows Installer (MSI) action InstallInitialize (official Microsoft documentation at this link: https://docs.microsoft.com/en-us/windows/win32/msi/installinitialize-action) or after the standard Windows Installer (MSI) action InstallFinalize (official Microsoft documentation at this link: https://docs.microsoft.com/en-us/windows/win32/msi/installfinalize-action).

Could you please try scheduling / sequencing your PowerShell custom action in the Install UI Sequence and the Install Exec Sequence After CostFinalize (official Microsoft documentation at this link: https://docs.microsoft.com/en-us/windows/win32/msi/costfinalize-action)? Please give that a try, rebuild the project, then retest this issue. Does that work for you?

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

Hello, Revenera_Ian

Well, as oriented my custom action now works, but when I try to execute a command, 'lodctr /r' for example, I don't see or I don't know how to make sure it's working, I tried using 'pause' to see if the command would pause Powershell, but nothing happens, I tried to check the log but not valid information.

In my Script I passed some simple commands and tried to open notepad, it opens but the others I can't see anything happening.

0 Kudos

Hello @LucasMarchi,

Thank you for your reply.

Could you please open a case with our Support Team?

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

0 Kudos