- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Custom Action
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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?
- Tags:
- InstallShield 2021
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)