
using [ProductVersion] in an install condition
Posted 26 January 2012 - 17:22
Stefan implied there was another way to do this with minor up/downgrade in this post: http://forum.install...showtopic=17917
The issue with my thought is that the conditional statement does not appear to like having [ProductVersion] in the statement (it throws an error). If I try to change it to just ProductVersion the conditional reads as regVers < ProductVersion but once you exit the wizard it shows the evaluation of it is "regVers" which would always be true.
Surely there is a better way to go about doing this.
Posted 26 January 2012 - 17:43
QUOTE |
the conditional statement does not appear to like having [ProductVersion] in the statement (it throws an error). |
That's correct, in a conditional statement you don't put [] around property names.
QUOTE |
If I try to change it to just ProductVersion the conditional reads as regVers < ProductVersion but once you exit the wizard it shows the evaluation of it is "regVers" which would always be true. |
Not sure what you mean: which wizard? At design time (in the InstallShield IDE) or at runtime/install time?
Stefan Krüger
InstallSite.org twitter facebook
Posted 26 January 2012 - 17:50
Posted 26 January 2012 - 17:53
You could always go to the Direct Editor, open the LaunchConditions table and edit it there.
Stefan Krüger
InstallSite.org twitter facebook
Posted 26 January 2012 - 18:04
Posted 26 January 2012 - 19:25
they are even before file extraction but seems to take place after regardless. So my conditional never seems to get evaluated b/c find related products seems to happen before it? Findrelatedproducts is way later in the sequence though
attaching screenshots of the sequence for reference


Edited by overlordchin, 26 January 2012 - 19:27.
Posted 27 January 2012 - 10:38
Stefan Krüger
InstallSite.org twitter facebook
Posted 27 January 2012 - 13:57
QUOTE (Stefan Krueger @ 2012-01-27 10:38) |
I don't think your setup exits because of the ISPreventDowngrade action. Generate a log file, this will tell you the actual values of the properties, whether AppSearch finds anything, and why (or at least: when) your setup dies. |
How do I enable logging in a basic msi installer? I see "MsiLogging" in the direct editor and it is set to "voicewarmupx"
Am I correct in assuming the log will be in temp with the name MSI{GUID}.log?
Posted 27 January 2012 - 14:50
http://support.microsoft.com/kb/223300
and this is the log file:
CODE |
=== Verbose logging started: 1/27/2012 8:42:15 Build type: SHIP UNICODE 3.01.4001.5512 Calling process: \\build\Shared\Installers\Internal\setup.exe === MSI (c) (8C:60) [08:42:15:139]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\WINDOWS\Installer\aa792c.msi' against software restriction policy MSI (c) (8C:60) [08:42:15:139]: SOFTWARE RESTRICTION POLICY: C:\WINDOWS\Installer\aa792c.msi has a digital signature MSI (c) (8C:60) [08:42:15:311]: SOFTWARE RESTRICTION POLICY: C:\WINDOWS\Installer\aa792c.msi is permitted to run at the 'unrestricted' authorization level. MSI (c) (8C:60) [08:42:15:389]: Cloaking enabled. MSI (c) (8C:60) [08:42:15:389]: Attempting to enable all disabled priveleges before calling Install on Server MSI (c) (8C:60) [08:42:15:420]: End dialog not enabled MSI (c) (8C:60) [08:42:15:420]: Original package ==> C:\WINDOWS\Installer\aa792c.msi MSI (c) (8C:60) [08:42:15:420]: Package we're running from ==> C:\WINDOWS\Installer\aa792c.msi MSI (c) (8C:60) [08:42:15:420]: APPCOMPAT: looking for appcompat database entry with ProductCode '{C6642AF6-6E27-43C4-9C99-E53257D47EA5}'. MSI (c) (8C:60) [08:42:15:420]: APPCOMPAT: no matching ProductCode found in database. MSI (c) (8C:60) [08:42:15:420]: MSCOREE not loaded loading copy from system32 MSI (c) (8C:60) [08:42:15:436]: Machine policy value 'DisablePatch' is 0 MSI (c) (8C:60) [08:42:15:436]: Machine policy value 'AllowLockdownPatch' is 0 MSI (c) (8C:60) [08:42:15:436]: Machine policy value 'DisableLUAPatching' is 0 MSI (c) (8C:60) [08:42:15:436]: Machine policy value 'DisableFlyWeightPatching' is 0 MSI (c) (8C:60) [08:42:15:436]: Enabling baseline caching for this transaction since all active patches are MSI 3.0 style MSPs or at least one MSI 3.0 minor update patch is active MSI (c) (8C:60) [08:42:15:436]: APPCOMPAT: looking for appcompat database entry with ProductCode '{C6642AF6-6E27-43C4-9C99-E53257D47EA5}'. MSI (c) (8C:60) [08:42:15:436]: APPCOMPAT: no matching ProductCode found in database. MSI (c) (8C:60) [08:42:15:436]: Transforms are not secure. MSI (c) (8C:60) [08:42:15:436]: No Command Line. MSI (c) (8C:60) [08:42:15:436]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{B348B923-CC47-4247-8FF5-FE1377140DAB}'. MSI (c) (8C:60) [08:42:15:436]: Product Code passed to Engine.Initialize: '(none)' MSI (c) (8C:60) [08:42:15:436]: Product Code from property table before transforms: '{C6642AF6-6E27-43C4-9C99-E53257D47EA5}' MSI (c) (8C:60) [08:42:15:436]: Product Code from property table after transforms: '{C6642AF6-6E27-43C4-9C99-E53257D47EA5}' MSI (c) (8C:60) [08:42:15:436]: Product registered: entering maintenance mode MSI (c) (8C:60) [08:42:15:436]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'. MSI (c) (8C:60) [08:42:15:436]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'. MSI (c) (8C:60) [08:42:15:436]: Package name retrieved from configuration data: 'My.msi' MSI (c) (8C:60) [08:42:15:436]: Determined that existing product (either this product or the product being upgraded with a patch) is installed per-machine. MSI (c) (8C:60) [08:42:15:436]: Note: 1: 2729 MSI (c) (8C:60) [08:42:15:436]: Note: 1: 2729 MSI (c) (8C:60) [08:42:15:436]: Note: 1: 2262 2: AdminProperties 3: -2147287038 MSI (c) (8C:60) [08:42:15:436]: Machine policy value 'DisableMsi' is 0 MSI (c) (8C:60) [08:42:15:436]: Machine policy value 'AlwaysInstallElevated' is 0 MSI (c) (8C:60) [08:42:15:436]: User policy value 'AlwaysInstallElevated' is 0 MSI (c) (8C:60) [08:42:15:436]: Product {C6642AF6-6E27-43C4-9C99-E53257D47EA5} is admin assigned: LocalSystem owns the publish key. MSI (c) (8C:60) [08:42:15:436]: Product {C6642AF6-6E27-43C4-9C99-E53257D47EA5} is managed. MSI (c) (8C:60) [08:42:15:436]: Running product '{C6642AF6-6E27-43C4-9C99-E53257D47EA5}' with elevated privileges: Product is assigned. MSI (c) (8C:60) [08:42:15:436]: TRANSFORMS property is now: MSI (c) (8C:60) [08:42:15:436]: PROPERTY CHANGE: Adding PRODUCTLANGUAGE property. Its value is '1033'. MSI (c) (8C:60) [08:42:15:436]: PROPERTY CHANGE: Adding VersionDatabase property. Its value is '200'. MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Application Data MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Favorites MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\NetHood MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\My Documents MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\PrintHood MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Recent MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\SendTo MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Templates MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Application Data MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Local Settings\Application Data MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\My Documents\My Pictures MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu\Programs\Startup MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu\Programs MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Desktop MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Start Menu\Programs\Administrative Tools MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Start Menu\Programs\Startup MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Start Menu\Programs MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Start Menu MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\QA\Desktop MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Templates MSI (c) (8C:60) [08:42:15:436]: SHELL32::SHGetFolderPath returned: C:\WINDOWS\Fonts MSI (c) (8C:60) [08:42:15:452]: Note: 1: 2898 2: MS Sans Serif 3: MS Sans Serif 4: 0 5: 16 MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding Privileged property. Its value is '1'. MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding USERNAME property. Its value is 'QA'. MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding COMPANYNAME property. Its value is 'MyCompany'. MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding Installed property. Its value is '2012/01/26 07:21:58'. MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding DATABASE property. Its value is 'C:\WINDOWS\Installer\aa792c.msi'. MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding OriginalDatabase property. Its value is 'C:\WINDOWS\Installer\aa792c.msi'. === Logging started: 1/27/2012 8:42:15 === MSI (c) (8C:60) [08:42:15:452]: Note: 1: 2205 2: 3: PatchPackage MSI (c) (8C:60) [08:42:15:452]: Machine policy value 'DisableRollback' is 0 MSI (c) (8C:60) [08:42:15:452]: User policy value 'DisableRollback' is 0 MSI (c) (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding UILevel property. Its value is '2'. MSI (c) (8C:60) [08:42:15:452]: Creating MSIHANDLE (1) of type 790537 for thread 3936 MSI (c) (8C:60) [08:42:15:452]: MsiOpenPackageEx is returning 0 MSI (c) (8C:60) [08:42:15:452]: MsiOpenPackage is returning 0 MSI (c) (8C:60) [08:42:15:452]: Closing MSIHANDLE (1) of type 790537 for thread 3936 === Verbose logging stopped: 1/27/2012 8:42:15 === |
Posted 27 January 2012 - 15:49
I did a diff on the two log files and the new file has these differences:
CODE |
MSI (c) (A4:3C) [09:44:25:561]: Resetting cached policy values MSI (c) (A4:3C) [09:44:25:561]: Machine policy value 'Debug' is 0 MSI (c) (A4:3C) [09:44:25:561]: ******* RunEngine: ******* Product: C:\Documents and Settings\QA\Local Settings\Application Data\Downloaded Installations\{263A3282-EF26-47AB-8CDB-6BA217663CE1}\My.msi ******* Action: ******* CommandLine: ********** MSI (c) (A4:3C) [09:44:25:561]: Machine policy value 'DisableUserInstalls' is 0 |
CODE |
MSI (c) (A4:3C) [09:44:28:436]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\Documents and Settings\QA\Local Settings\Application Data\Downloaded Installations\{263A3282-EF26-47AB-8CDB-6BA217663CE1}\My.msi' against software restriction policy MSI (c) (A4:3C) [09:44:28:436]: SOFTWARE RESTRICTION POLICY: C:\Documents and Settings\QA\Local Settings\Application Data\Downloaded Installations\{263A3282-EF26-47AB-8CDB-6BA217663CE1}\My.msi has a digital signature MSI (c) (A4:3C) [09:44:29:452]: SOFTWARE RESTRICTION POLICY: C:\Documents and Settings\QA\Local Settings\Application Data\Downloaded Installations\{263A3282-EF26-47AB-8CDB-6BA217663CE1}\My.msi is permitted to run at the 'unrestricted' authorization level. |
CODE |
MSI (c) (A4:3C) [09:44:29:499]: Product installation will be elevated because user is admin and product is being installed per-machine. MSI (c) (A4:3C) [09:44:29:499]: Running product '{9D196378-8B0C-4F55-BD75-14CE6A17DBA4}' with elevated privileges: Product is assigned. MSI (c) (A4:3C) [09:44:29:499]: PROPERTY CHANGE: Adding SETUPEXEDIR property. Its value is '\\build\Shared\Installers\Internal'. MSI (c) (A4:3C) [09:44:29:499]: PROPERTY CHANGE: Adding CURRENTDIRECTORY property. Its value is '\\build\Shared\Installers\Internal'. MSI (c) (A4:3C) [09:44:29:499]: PROPERTY CHANGE: Adding CLIENTUILEVEL property. Its value is '0'. MSI (c) (A4:3C) [09:44:29:499]: PROPERTY CHANGE: Adding CLIENTPROCESSID property. Its value is '4004'. |
Just noticed this subtle difference:
CODE |
MSI (c) (A4:3C) [09:44:29:499]: PROPERTY CHANGE: Adding ProductState property. Its value is '-1'. |
vs
CODE |
MSI (c) (8C:60) [08:42:15:436]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'. |
When the product code is change it sets the productstate property value to -1 as in the product is not currently installed on the machine. When it is not changed it sets it to 5.. so the products is installed for the current user. Which makes sense when I think about it. It says "MSI © (8C:60) [08:42:15:436]: Product registered: entering maintenance mode" right before that message in the log where I did not change the product code. Not sure if that is significant or its just 'hey i detected a previous version going into maintenance mode to attempt an upgrade'
Edited by overlordchin, 27 January 2012 - 17:59.
Posted 30 January 2012 - 15:10
mysetup.exe /Verbose"c:\testing.log"
no additional log file was created only the one in temp that is MSIxxxxx.LOG which is the one I posted on Friday.
Posted 30 January 2012 - 17:17
In the first case it's a major upgrade and the Upgrade table is used. The second case id a minor update and the Upgrade table is not used.
In your log I noticed that you are calling MsiOpenPackageEx. What are you doing there?
BTW the link to how to log a setup is in my signatur

Stefan Krüger
InstallSite.org twitter facebook
Posted 30 January 2012 - 17:45
Posted 02 February 2012 - 20:10
Posted 06 February 2012 - 20:35
MSI © (8C:60) [08:42:15:452]: PROPERTY CHANGE: Adding UILevel property. Its value is '2'.
MSI © (8C:60) [08:42:15:452]: Creating MSIHANDLE (1) of type 790537 for thread 3936
MSI © (8C:60) [08:42:15:452]: MsiOpenPackageEx is returning 0
MSI © (8C:60) [08:42:15:452]: MsiOpenPackage is returning 0
MSI © (8C:60) [08:42:15:452]: Closing MSIHANDLE (1) of type 790537 for thread 3936
=== Verbose logging stopped: 1/27/2012 8:42:15 ===
Posted 07 February 2012 - 15:43
Stefan Krüger
InstallSite.org twitter facebook
Posted 08 February 2012 - 21:29
Posted 08 February 2012 - 22:04