sasha
Posts: 88
Joined: Fri Oct 20, 2023 8:37 pm

A truly strange issue

Hello,

before I describe the issue, I have to state that I am of sound mind and don't believe in miracles.

Now, I am seeing a really strange issue. We have a PowerShell script that is executed via the 'run powershell script file' custom action. In the script, a few properties are read and set.
I noticed that some properties (not all) are not available - the Get-Property (or the direct AI_GetMsiPropertycall) return empty values.
I tried various things and ended up calling the Get-Property/AI_GetMsiProperty more than once. And that resulted in the properties to become available. Strange, but OK.
Here is the weird part.
I simply commented out these additional calls. Things still work. I removed the commented-out block. Things break - properties are not available. No matter where in the .ps1 file I place this comments block, things work. If I remove the comments, things break.

I know this sounds crazy, but that's what it is.

The CA is immediate, with the UI and Execution sequences.

Any ideas?
Thanks!
Catalin
Posts: 7717
Joined: Wed Jun 13, 2018 7:49 am

Re: A truly strange issue

Hello Sasha,

That indeed sounds off. :shock:

Would you be able to create a sample where this reproduces and forward that to me via email at support at advancedinstaller dot com, together with a test case so I can run some more tests on my end?

I have tried reproducing this in a sample project and I'm not quite able to do so.

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

Return to “Common Problems”