InstallShield 2016 » InstallScript Language Reference
Project • This information applies to the following project types:
• | InstallScript |
• | InstallScript MSI |
The FeatureFilterOS function filters components that are flagged for specified operating systems and suites.
Note • This function cannot be used with script-created feature sets.
Any filtering that is done when the installation is first run must also be done during maintenance mode. Be sure to call this function in code that is executed during both initial and maintenance installations. Do not call this function from the following event handlers: OnAppSearch, OnCCPSearch, OnFirstUIBefore, OnFirstUIAfter, OnMaintUIBefore, or OnMaintUIAfter.
Project • Components are not filtered by default in an InstallScript MSI installation.
In an InstallScript installation, FeatureFilterOS is called by the default OnFilterComponents event handler during both initial and maintenance installations. This event handler filters components by default that are specific to operating systems and suites other than those on the target system. An installation that is run in maintenance mode has no information about the filtering that was done during the initial installation.
Syntax
FeatureFilterOS ( szMediaLibrary, nSuites, nOS, bFiltered );
Parameters
Parameter |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||
szMediaLibrary |
Specifies the media name of the file media library. |
||||||||||||||||||||||||||||||||||||||||||||||||
nSuites |
Specifies the operating system suite or suites that you want to filter. Choose from the following values. You can combine values using the bitwise OR operator ( | ). Note • The suites listed here are those that can be specified in the Windows API's OSVERSIONINFOEX data structure.
Project • InstallScript MSI projects do not have support for platform suites. Therefore, in an InstallScript MSI project, you must specify the number 0 for nSuites. Otherwise, the function fails and the information that is specified in nOS is ignored. |
||||||||||||||||||||||||||||||||||||||||||||||||
nOS |
Specifies the operating system or operating systems that you wish to filter. Choose from the following values. You can combine values using the bitwise OR operator ( | ).
Note • Several client and server versions of Windows use the same major and minor version numbers:
Therefore, for these operating system versions, the installation considers the client versions to be the same as the equivalent server versions; thus, components that are marked for the client version are also installed on the server version. To distinguish between the client and server versions, you can check whether SYSINFO.nOSProductType is equal to VER_NT_WORKSTATION; on client versions, this is true. On server versions, this is false. |
||||||||||||||||||||||||||||||||||||||||||||||||
bFiltered |
Specifies whether to filter (exclude) or unfilter (include) the operating systems specified in nOS. Pass one of the following predefined constants in this parameter:
|
Return Values
Return Value |
Description |
0 |
FeatureFilterOS was successful. |
< 0 |
FeatureFilterOS failed. Call FeatureError for additional information. |
Additional Information
While both ISOSL_ALL and ISOSL_SUPPORTED specify all Windows systems when passed as the third argument to FeatureFilterOS, they have different numeric values. ISOSL_ALL is zero (0) and ISOSL_SUPPORTED is the value obtained by combining every operating system constant using the bitwise OR operator, that is, ISOSL_WIN7_SERVER2008R2 | ISOSL_WINVISTA_SERVER2008 | ... . In some cases, you may find it useful to perform bitwise operations on ISOSL_SUPPORTED and other operating system constants.
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |