Will Custom Actions [script] allow MSI installer?

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
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.
User avatar
Posts: 31
Joined: Wed Jan 10, 2018 9:37 am

Will Custom Actions [script] allow MSI installer?

Post by PXL_Posh » Sat Jun 09, 2018 6:36 pm

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: 6604
Joined: Tue May 29, 2007 4:43 pm

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

Post by Alexander Riedel » Sun Jun 10, 2018 6:04 am

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.