clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Package code property

Hi,

What is the property which stores the package code?


I only found one the [PATCHNEWPACKAGECODE].

Thank you!

clint
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

Hello Clint,

The PATCHNEWPACKAGECODE property contains the revision number written in the package summary information.
For more details, see the Summary Information Properties article.

Let us know if that helped, otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Re: Package code property

Hello Dan,

I am trying to wite it to the Registry and it is not working

(See attachments)

Thank you!
clint
Attachments
RegistryPackageCode.JPG
RegistryPackageCode.JPG (70.25 KiB) Viewed 18322 times
Registry.JPG
Registry.JPG (46.71 KiB) Viewed 18323 times
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

Hi Clint,

This may happens because you are using a private property.
Windows Installer properties are global variables that Windows Installer uses during an installation. There are two main types of Windows Installer properties:
  • Private Properties (contain lower-case letters in their name, example: My_Prop)
  • Public Properties (contain only upper-case letters in their name, example: MY_PROP)
The difference between Public and Private properties consists in the way their values are being passed on. Only the value of a Public Property is passed on from the Wizard Dialogs Stage (in which the dialogs are showed) to the Install Execution Stage (in which the system is modified).

Therefore, make sure that you use a Public Property for an UI control (Editbox, Combobox etc) if you want its value to be available in the InstallExecute Sequence (for instance, if the value of this Property is written in the registry, .ini file), otherwise you will get the default value assigned to this property.

So, in your case, can you please try to use a intermediary public property which will be written in the registry and see if the behavior still persist?
You can set the value of this intermediary public property using the predefined Set installer property custom action.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Re: Package code property

Hi Dan,

I'll give it a try, but I was already assigning to the Registry action the public property [PATCHNEWPACKAGECODE]

Thank you!

clint
clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Re: Package code property

Hi Dan,

I tried that using a public property delcared in Install Parameters and a Custom Action "Set Property" to assign that property to [PATCHNEWPACKAGECODE] but it still didn't work.

Best Regards,
clint
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

Hi Clint,

I'm not sure why you encountered this behavior. I've tested your scenario and it worked as expected.

During a patch installation, the PATCHNEWPACKAGECODE property updates the Revision Number Summary property.

Since you want to write this value into the registry, you may need to create custom action which runs during a patch installation and write this value into the registry, as this property is set during a patch installation. You can take a look on the How do I create a patch that runs a custom action? article which may be useful to you.

Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Re: Package code property

Hallo Dan,

Thnaks for the help.

I am not trying to get the patch package code, but the package code for the first installation.

As I wrote, I didn't find a property for this, but instead only one for a Patch.

Is this PATCHNEWPACKAGECODE supposed to also show the package code for the first -time installation?

Thank you!

clint
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

Hi Clint,
I am not trying to get the patch package code, but the package code for the first installation.
Try to use the PackageCode property. You can also take a look on the Product Identification article which may be useful to you.
Is this PATCHNEWPACKAGECODE supposed to also show the package code for the first -time installation?
As explain in the above article, this property is only set during a patch installation.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Re: Package code property

Sorry about that Dan.

At one time in the past I did try the PackageCode and it wasn't working.

So I looked in the Property list (see attached) and didn't find one (Just the one for PATCHNEWPACKAGECODE).

I think what happened is I used it as a Public Property (all caps).

Now it is working.

PS: Why isn't it listed in the Property listing?

Thank you Dan!

clint
Attachments
PropertyList.JPG
PropertyList.JPG (106.54 KiB) Viewed 18289 times
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

You're welcome Clint,
PS: Why isn't it listed in the Property listing?
We will consider exposing this particular property since it is of use to other users too. Thank you for your suggestion.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

Hello,

The PackageCode property is exposed starting with version 11.6 of Advanced Installer released on October 23rd, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clint
Posts: 135
Joined: Fri Jun 19, 2009 9:46 am
Location: Germany

Re: Package code property

Thank you very much!!
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Package code property

You're welcome Clint,

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”