cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Marachkovski
Level 4

Custom action condition doesn't consider SYSINFO meber values.

I want to run my Custom Action only on Vista.
Tried to set different conditions on CA:
SYSINFO.WINNT.bWinVista=TRUE - executed on Vista and XP.
SYSINFO.WINNT.bWinVista="TRUE" - not executed at all.
SYSINFO.WINNT.bWinVista<>"TRUE" executed on Vista and XP.
SYSINFO.WINNT.bWinVista<>TRUE - not executed at all.
I ran my action from different places in execute sequence. No success.
SYSINFO.nISOSL=ISOSL_WINVISTA doesn't work too.
If check (SYSINFO.WINNT.bWinVista = TRUE) from IScript - works perfectly.
Can anybody explain this?
Labels (1)
0 Kudos
(6) Replies
kdelloyd
Level 3

SYSINFO is an InstallScript variable. Conditions should reference Windows Installer properties. Try using VersionNT (Vista = 600), WindowsBuild (Vista = greater than 5600). More help can be found in the Windows Installer help under Windows Installer Guide/Properties/Property reference/Operating System Property Values.

HTH 🙂
0 Kudos
Marachkovski
Level 4

Thanks for reply.
I need to determine Longhorn system. This is impossible with Operating System Properties. To do this i created custom action which executes InstallScript code like
if (SYSINFO.nISOSL = ISOSL_WINVISTA) then
MsiSetProperty(hMSI, "OSVISTA", "1");
if (SYSINFO.nOSProductType != VER_NT_WORKSTATION) then
MsiSetProperty(hMSI, "OSIsLonghorn", "1");
endif;
endif;
"OSVISTA" and "OSIsLonghorn" properties works normally in conditions...
0 Kudos
DLee65
Level 13

...MsiSetProperty(hMSI, "OSIsLonghorn", "1");...


I am not certain how you are using this but this is a private property whose value will not be transferred to the execute sequence if you are trying to use it there. Try changing this to all upper case "OS_IS_LONGHORN" and see if this helps.

EDIT:
... actually I see you are using this in the execute sequence, correct? So the private vs public would not apply here.

Are you using this as a condition on a feature or component?
0 Kudos
Marachkovski
Level 4

I use this property ("OSIsLonghorn") in custom action that run InstallScript function. This customAction i run with condition OSIsLonghorn = "1" in execute sequence after CostFinalize CA. And this works fine. On separate example works too.
0 Kudos
kdelloyd
Level 3

To differentiate Vista from Server "Longhorn" you can add the MsiNTProductType property to the mix. 🙂
0 Kudos
Marachkovski
Level 4

Thanks, but i think that such IS code is more simple and safe.
if (SYSINFO.nISOSL = ISOSL_WINVISTA) then
MsiSetProperty(hMSI, "OSVISTA", "1");
if (SYSINFO.nOSProductType != VER_NT_WORKSTATION) then
MsiSetProperty(hMSI, "OSIsLonghorn", "1");
endif;
endif;
0 Kudos