This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Differentiating Vista vs Longhorn using properties
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 11, 2007
10:48 AM
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?
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?
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 11, 2007
12:33 PM
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 🙂
HTH 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2007
07:51 AM
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...
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...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2007
01:54 PM
...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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2007
10:57 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2007
11:24 AM
To differentiate Vista from Server "Longhorn" you can add the MsiNTProductType property to the mix. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2007
10:32 AM
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;
if (SYSINFO.nISOSL = ISOSL_WINVISTA) then
MsiSetProperty(hMSI, "OSVISTA", "1");
if (SYSINFO.nOSProductType != VER_NT_WORKSTATION) then
MsiSetProperty(hMSI, "OSIsLonghorn", "1");
endif;
endif;