PreviousNext
Help Library

SYSINFO

InstallShield 12 » InstallScript Language Reference

During setup initialization, InstallShield sets the members of this structure variable to identify the operating platform of the target computer. By inspecting the values assigned to members of this variable, your script can determine the following information:

The following table shows the meaning of each SYSINFO member:

SYSINFO 

Member

Meaning

SYSINFO.bIntel

If TRUE, the processor is Intel.

SYSINFO.bIsWow64

If the setup is running on a 64-bit platform, this value is non-zero.

SYSINFO.bShellExplorer

If TRUE, the shell is Explorer.

SYSINFO.nISOSL

Value indicates the operating system of the target machine. Possible values are the following:

  • ISOSL_WIN95—Windows 95
  • ISOSL_WIN98—Windows 98
  • ISOSL_WINME—Windows Millennium Edition
  • ISOSL_NT40—Windows NT 4.0
  • ISOSL_WIN2000—Windows 2000
  • ISOSL_WINXP—Windows XP Edition
  • ISOSL_WINSERVER2003—Windows Server 2003
  • ISOSL_WINVISTA—Note that the installation considers Windows Server "Longhorn" to be the same as Windows Vista; thus, components that are marked for Windows Vista are also installed on Windows Server "Longhorn."

SYSINFO.nOSMajor

Value indicates operating system's major version number.

SYSINFO.nOSMinor

Value indicates operating system's major version number.

SYSINFO.nOSProductType

Value indicates the wProductType of the Windows OSVERSIONINFOEX structure as defined for the current platform. Possible values are the following:

VER_NT_WORKSTATION

VER_NT_DOMAIN_CONTROLLER

VER_NT_SERVER

You can also #define and test for any other constant supported by wProduct Type. The OSVERSIONINFOEX structure is documented at http://msdn.microsoft.com/library/en-us/sysinfo/base/osversioninfoex_str.asp.

SYSINFO.nOSSuiteMask

Value indicates the wSuitesMask of the Windows OSVERSIONINFOEX structure as defined for the current platform. Possible values are the following:

VER_SUITE_BACKOFFICE

VER_SUITE_DATACENTER

VER_SUITE_ENTERPRISE

VER_SUITE_PERSONAL

VER_SUITE_SMALLBUSINESS

VER_SUITE_SMALLBUSINESS_RESTRICTED

VER_SUITE_TERMINAL

You can also #define and test for any other constant supported by wSuiteMask. The OSVERSIONINFOEX structure is documented at http://msdn.microsoft.com/library/en-us/sysinfo/base/osversioninfoex_str.asp.

SYSINFO.nSuites

A combination of one or more bit flags that indicate the suite(s) on the target machine. Possible bit flags are the following:

ISOS_ST_ALL

ISOS_ST_XP_PRO

ISOS_ST_XP_HOME

ISOS_ST_SERVER

ISOS_ST_WORKSTATION

ISOS_ST_BACKOFFICE

ISOS_ST_DATACENTER

ISOS_ST_ENTERPRISE

ISOS_ST_SMALLBUSINESS

ISOS_ST_SMALLBUSINESS_RESTRICTED

ISOS_ST_TERMINAL

0 (zero)—indicates that no suite is detected on the target machine

To check whether a bit flag is set, use the bitwise AND (&) operation as in the following example:

if (SYSINFO.nSuites & ISOS_ST_XP_HOME) 
then

    /* Perform operations that are 

    specific to Windows XP Home Edition. 
*/

endif;

Note

Due to Windows limitations, suites can be detected only on Windows NT 4 SP 6 and later, Windows 2000, and Windows XP.

The suites listed here are those that can be specified in the Windows API's OSVERSIONINFOEX data structure (as documented at http://msdn.microsoft.com/library/en-us/sysinfo/base/osversioninfoex_str.asp).

SYSINFO.nSystemDefaultUILangID

Value indicates the installed operating system language's ID.

SYSINFO.nSystemLangID

Value indicates the system language's ID.

SYSINFO.nUserLangID

Value indicates the user language's ID.

SYSINFO.nWinMajor

Value indicates Windows major version number.

SYSINFO.nWinMinor

Value indicates Windows minor version number.

SYSINFO.szInstalledIEVersion

Note

Value indicates the Internet Explorer version on the system. This member is supported for versions 4 and later. If the version installed is prior to 4, the value will be "".

Do not rely on the fact that this value is "" for versions previous to 4. Instead, test specifically for 4 or later, as in the future this member variable could support detecting IE versions earlier than 4.

SYSINFO.WIN9X.bWin9X

If TRUE, OS is Windows 95, 98, or Millennium Edition.

SYSINFO.WIN9X.bWin95

If TRUE, OS is Windows 95.

SYSINFO.WIN9X.bWin98

If TRUE, OS is Windows 98.

SYSINFO.WIN9X.bWinMe

If TRUE, OS is Windows ME (Millennium Edition).

SYSINFO.WIN9X.bSubversion_A

If TRUE, OS is Windows 95 or 98 Subversion A.

Early versions of Windows 95 did not include subversion information. For these operating systems, SYSINFO.WIN9X.bWin95 is non-zero but no SYSINFO.WIN9X.bSubversion_n member is non-zero; in such a case, the operating system is Windows 95 Subversion A.

SYSINFO.WIN9X.bSubversion_B

If TRUE, OS is Windows 95 or 98 Subversion B.

SYSINFO.WIN9X.bSubversion_C

If TRUE, OS is Windows 95 or 98 Subversion C.

SYSINFO.WIN9X.bVersionNotFound

If TRUE, OS subversion was not found for Windows 95 or 98.

SYSINFO.WINNT.bAdmin_Logged_On

If TRUE, end user is logged in under NT with administator rights.

SYSINFO.WINNT.bPowerUser_Logged_On

If the target operating system is Windows 2000, XP, or later, indicates whether the current user belong to the power user group. In a setup running under Windows NT 4, this value is always FALSE, since Windows NT 4 does not support power users. In a setup running under Windows 95, 98, or Me, this value is always TRUE.

SYSINFO.WINNT.bWinNT

If TRUE, OS is Windows NT (includes Windows 2000 and Windows XP).

SYSINFO.WINNT.bWinNT4

If TRUE, OS is Windows NT 4.0.

SYSINFO.WINNT.bWinXP

If TRUE, OS is Windows XP.

SYSINFO.WINNT.bWin2000

If TRUE, OS is Windows 2000.

SYSINFO.WINNT.bWinServer2003

If TRUE, OS is Windows Server 2003.

SYSINFO.WINNT.nServicePack

The number of the installed service pack on Windows NT, 2000, Windows XP, Windows Server 2003, and any other future operating system (that is, Windows NT 4.0 and later).

Note that for Windows 2000 and later, the installation obtains this information by calling the Windows API GerVersionEx and reading the nServicePackMajor value.

On systems with platforms earlier than Windows 2000, the installation obtains this information from the appropriate service pack registry location.

Example

The following code fragment displays a message box if the operating platform on the target system is Windows XP.

     if (SYSINFO.WINNT.bWinXP) then

        MessageBox("Installing on Windows XP",INFORMATION);

    endif;




Macrovision Corporation
copyright
contact