Platform Property

Returns the operating system platforms supported by the current package, or specifies the target platforms for new packages that are created.

Syntax

object.Platform [= value]

The Platform property syntax has the following parts:

Part Description
object An object expression that evaluates to a Package object.
value A numeric value which specifies one or more platforms which are supported in the current package.

Settings

The settings for the Platform property are:

Constant Description
apDefaultPlatform Specifies the default operating system platform. When a package is created, this specifies that all Windows platforms are supported. When a package is applied, this specifies that only those files which are targeted for the current platform should be applied.
apPlatformWin95 The files may be applied to a system running Windows 95.
apPlatformWin98 The files may be applied to a system running Windows 98.
apPlatformWinME The files may be applied to a system running Windows ME.
apPlatformWinNT40 The files may be applied to a system running Windows NT 4.0.
apPlatformWin2000 The files may be applied to a system running Windows 2000.
apPlatformWinXP The files may be applied to a system running Windows XP.
apPlatformWin2003 The files may be applied to a system running Windows Server 2003.
apPlatformWin32 The files may be applied to any 32-bit version of the Windows operating system.
apPlatformWin9X The files may be applied to any system running Windows 95, Windows 98 or Windows ME. They will not be applied on a system running Windows NT, Windows 2000 or Windows XP.
apPlatformWinNT The files may be applied to any system running Windows NT, Windows 2000 or Windows XP. They will not be applied on a system running Windows 95, Windows 98 or Windows ME.
apPlatformWindows The files may be applied to any system running any version of Microsoft Windows.

Remarks

You may combine one or more of these values together using a bitwise Or operator. For example, to specify a platform that consists of only Windows ME and Windows 2000, you could use the statement:

Package1.Platform = apPlatformWinME Or apPlatformWin2000

It is recommended that you use the Or operator rather than addition, since addition can have unexpected results. For example, the following statement would be incorrect:

Package1.Platform = apPlatformWinNT + apPlatformWin2000

The reason is that the apPlatformWinNT constant is a combination of values which includes the value represented by apPlatformWin2000. When testing or setting individual bit values in an integer, always use bitwise operators.

See Also

Find Method