Summary
This article discusses the difference between a public MSI property and a global InstallScript variable.
Public Property (Basic MSI Project)
Public properties have names that contain only uppercase letters. For example, INSTALLDIR is a public property. Public properties can be specified at the command line used to launch the installation or chosen by using an authored user interface. If you are creating your own properties, use all uppercase letters if you want end-users to have access to these properties.
In order to allow the end-user or administrator to change the destination via the user interface or from the command line, the Directory Identifier for the component’s destination must be a public property.
NOTE: Only public properties have their values preserved from an installation’s user interface and User Interface Sequence to the point where the installation is changing the target system, known as the Execute Sequence. If you set the value of a property in a dialog box displayed to the end-user, use a public property (for example, MY_PUBLIC_PROPERTY) if you want its value written to a file or to the Windows Registry.
The value of a public property is passed on from the User Interface Sequence (in which the dialogs are shown) to the Execute Sequence (in which the system is modified). Additionally, only public properties can be specified at the command line as parameters passed to msiexec.exe which is the main executable for running an MSI (Windows Installer) package.
Therefore, make sure that you use a public property to store the value for a UI control (EditBox, ComboBox, etc.) if you want its value to be available in the Execute Sequence, for instance, if the value of this property is written to the Windows Registry.
Global Variable (InstallScript Project)
A global variable in the program is a variable defined outside the subroutine or function. It has a global scope means it holds its value throughout the lifetime of the program. Hence, it can be accessed throughout the program by any function defined within the program, unless it is shadowed. If you want to use the global variable in another .rul file, you have to include the .rul file which declares the global variable.
Global Variable (InstallScript MSI Project)
OnFirstUIAfter is called by the InstallScript engine after the MSI finishes, so you can't access MSI properties with public properties. It's possible with setting a global variable in OnFirstUIBefore and using that in OnFirstUIAfter.
Related Articles
Differences Between A Public And Private Property 7Number of Views What Are the Differences Between Basic MSI and InstallScript MSI Project? 5Number of Views InstallScript System Variables Versus MSI Properties 3Number of Views Trimming the Buffer from an MSI Property obtained in InstallScript 3Number of Views Logging An InstallScript MSI Project 350Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago