Will Custom Actions [script] allow MSI installer?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
PXL_Posh
Posts: 40
Last visit: Thu Nov 07, 2019 5:43 am

Will Custom Actions [script] allow MSI installer?

Post by PXL_Posh »

Powershell Studio 2018 64-bit
Windows 10 64bit VM

Hello again,

I wrote a ps1 script to install the MSI Package for RealVNC as a Custom Action.

It didn't work, so I found the Installer actions on your blog and replicated them in a batch
on the target system to do some troublshooting:

Code: Select all

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -InputFormat None -NoProfile -File "C:\VNCInstall.ps1"
The script checks to see if RealVNC Ltd is located in HKLM ... Uninstall and I get a true // false depending on if it's installed.
This works. I have it placing text into a log file whether true or false to indicate the outcome of the logic.

However when I run the ps1 as a Custom Action I can just about see the VNC MSI unpacking in the background then it disappears.

The custom action script is also trapping $Error but nothing comes out.

I'm trying to remember is this scenario is strictly forbidden: install an MSI from within an MSI.
I thought I might have read something about that.

Should this work?


EDIT: I tried post commit but that didn't work either.
User avatar
Alexander Riedel
Posts: 8488
Last visit: Tue Apr 16, 2024 8:42 am
Answers: 20
Been upvoted: 37 times

Re: Will Custom Actions [script] allow MSI installer?

Post by Alexander Riedel »

No, generally while one Windows Installer is running, another is not allowed to run. It's too easy for installers to interfere with one another. Imagine one rebooting while the other still copies files :D
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 5 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.