Obtaining the Product Code at setup runtime for an MSI created using pgplwiz.exe

Got a problem you cannot solve? Try here.
Kostya
Posts: 6
Joined: Tue Jul 25, 2017 8:09 am

Obtaining the Product Code at setup runtime for an MSI created using pgplwiz.exe

Postby Kostya » Mon Oct 24, 2022 5:54 am

Hello,

I create an EXE installer using miabuild.exe (with "/r" parameter so that the new revision code is used for this build) and then an MSI from it using pgplwiz.exe. I need to get the Product Code of the resulting outer/wrapper MSI at setup runtime. As far as I understand, this code is generated when the MSI is created and cannot be obtained at this stage, for example, as a value of a pre-defined variable:



At the same time, I see that during the installation phase this code can be found as a SFXFILE variable value, like {db315e55-57f6-4109-b88b-792192b81480}.exe. There are two questions:

1. How reliable is this way of getting the outer MSI Product Code?
2. Is there a more correct way to get this value at setup runtime?

Thanks!

JohnGaver
Posts: 67
Joined: Mon Feb 05, 2024 6:15 pm

Re: Obtaining the Product Code at setup runtime for an MSI created using pgplwiz.exe

Postby JohnGaver » Fri Feb 23, 2024 11:57 am

You're doing it the proper way.

You could also take this all the way out to the main container folder of the Group Policy MSI wrapper, through the GPOPATH and SETUPPATH pre-defined script variables:

www.installaware.com/mh52/desktop/prede ... iables.htm
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 56 guests