Page 1 of 1

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

Posted: Mon Oct 24, 2022 5:54 am
by Kostya
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!

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

Posted: Fri Feb 23, 2024 11:57 am
by JohnGaver
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