How do I get detailing operating system information using Wise Script?
| Article:HOWTO4009 | | | Created: 2006-06-24 | | | Updated: 2006-07-12 | | | Article URL http://www.symantec.com/docs/HOWTO4009 |
Question
How can I get detailed operating system information using Wisescript?
Answer
The Wisescripts supplied below have been authored by Jimmy Huygens and contributed to the Wise Installation System forum in response to the number of questions posted by users asking how to derive the target system' s operating system version; detecting Windows XP Professional* or Home edition*, Windows 2003 Server*, etc.
The scripts include an action and a sample script. They will detect every Windows operating-system, Service Pack level, operating system type, and its SuiteMask.
The SuiteMask can contain any or a combination of the following values:
- Microsoft BackOffice components are installed.
- A very limited form of Terminal Services is installed, for supporting the remote desktop.
- Windows Server 2003, Web Edition is installed.
- Windows 2000 Datacenter Server or Windows Server 2003, Datacenter Edition is installed.
- Windows NT 4.0 Enterprise Edition, Windows 2000 Advanced Server, or Windows Server 2003, Enterprise Edition is installed.
- Windows XP Home Edition is installed.
- Microsoft Small Business Server is installed.
- Microsoft Small Business Server is installed with the restrictive client license in force.
- Windows Server 2003 is installed as a hardened operating system as part of a security appliance.
- Terminal Services is installed.
Fore more information: http://msdn.microsoft.com/libr...sversioninfoex_str.asp
If you find any bugs, just drop Jimmy an e-mail at jhuygens2@csc.com
Copy and paste each of the code segments below into Wisescript Editor, and save with the given names.
To use the action, save it to your Actions directory, restart Wise, and you are ready to go.
Get OS Info-script.wse
item: Remark
Text=Get Operating System Info
end
item: Remark
Text=
end
item: Remark
Text=Scriptname : Get OS Info-script.WSE
end
item: Remark
Text=Script type : Sample Script
end
item: Remark
Text=Author : J. Huijgens
end
item: Remark
Text=Purpose : Obtain all Operatin System Information.
end
item: Remark
Text=Date : 28/02/2002
end
item: Remark
Text=
end
item: Remark
Text=Changes
end
item: Remark
Text=Date (28/06/05): Added support for Windows XP (Prof & Home), Windows 2003 and all available product suites.
end
item: Remark
Text=Date (dd/mm/yy): Reason for program changes
end
item: Remark
Text==================================================================================
end
item: Remark
end
item: Remark
end
item: Remark
Text=Execute the function.
end
item: Call DLL Function
Pathname=%SYS32%\Kernel32.dll
Function Name=GetVersionExA
Argument List=r1156
Argument List=³0MAJORVERSION
Argument List=³0MINORVERSION
Argument List=³0BUILDNUMBER
Argument List=³0PLATFORMID
Argument List=¹0 CSDVERSION
Argument List=±0SERVICEPACKMAJOR
Argument List=±0SERVICEPACKMINOR
Argument List=°0SUITEMASK
Argument List=°0PRODUCTTYPE
Argument List=°0RESERVED
Return Variable=2RESULT
Flags=00100000
end
item: If/While Statement
Variable=RESULT
Value=0
Flags=00000001
end
item: Remark
end
item: Remark
Text================ Determine Operating System ===============
end
item: Remark
end
item: If/While Statement
Variable=MAJORVERSION
Value=3
end
item: Remark
Text=Windows NT 3.51
end
item: Set Variable
Variable=OS
Value=Windows NT 3.51
end
item: End Block
end
item: Remark
end
item: If/While Statement
Variable=MAJORVERSION
Value=4
end
item: Remark
Text=Windows 95,Windows 98,Windows Me,Windows NT 4.0
end
item: If/While Statement
Variable=MINORVERSION
Value=0
end
item: Remark
Text=Windows 95, Windows NT 4.0
end
item: If/While Statement
Variable=PLATFORMID
Value=1
end
item: Remark
Text=Windows 95
end
item: Set Variable
Variable=OS
Value=Windows 95
end
item: ElseIf Statement
Variable=PLATFORMID
Value=2
end
item: Remark
Text=Windows NT 4.0
end
item: Set Variable
Variable=OS
Value=Windows NT 4.0
end
item: End Block
end
item: ElseIf Statement
Variable=MINORVERSION
Value=10
end
item: Remark
Text=Windows 98
end
item: Set Variable
Variable=OS
Value=Windows 98
end
item: ElseIf Statement
Variable=MINORVERSION
Value=90
end
item: Remark
Text=Windows ME
end
item: Set Variable
Variable=OS
Value=Windows ME
end
item: End Block
end
item: End Block
end
item: Remark
end
item: If/While Statement
Variable=MAJORVERSION
Value=5
end
item: Remark
Text=Windows 2000,Windows XP,Windows Server 2003 family
end
item: If/While Statement
Variable=MINORVERSION
Value=0
end
item: Remark
Text=Windows 2000
end
item: Set Variable
Variable=OS
Value=Windows 2000
end
item: ElseIf Statement
Variable=MINORVERSION
Value=1
end
item: Remark
Text=Windows XP
end
item: Set Variable
Variable=OS
Value=Windows XP
end
item: ElseIf Statement
Variable=MINORVERSION
Value=2
end
item: Remark
Text=Windows Server 2003 family
end
item: Set Variable
Variable=OS
Value=Windows Server 2003 family
end
item: End Block
end
item: End Block
end
item: Remark
end
item: Remark
end
item: Remark
Text================ Determine Product Type ===============
end
item: Remark
end
item: If/While Statement
Variable=PRODUCTTYPE
Value=1
end
item: Set Variable
Variable=PRODUCTTYPE
Value=Workstation
end
item: ElseIf Statement
Variable=PRODUCTTYPE
Value=2
end
item: Set Variable
Variable=PRODUCTTYPE
Value=Domain Controller
end
item: ElseIf Statement
Variable=PRODUCTTYPE
Value=3
end
item: Set Variable
Variable=PRODUCTTYPE
Value=Server
end
item: End Block
end
item: Remark
end
item: Remark
end
item: Remark
Text================ Determine Suite Mask ===============
end
item: Remark
end
remarked item: Set Variable
Variable=SUITEMASK
Value=%SUITEMASK%
end
item: Set Variable
Variable=SUITECOUNT
Value=0
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SINGLEUSERTS
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0123
Return Variable=3VER_SUITE_SINGLEUSERTS
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_SINGLEUSERTS
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_SINGLEUSERTS
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_SINGLEUSERTS
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. A very limited form of Terminal Services is installed, for supporting the remote desktop.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SMALLBUSINESS
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_SMALLBUSINESS
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_SMALLBUSINESS
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_SMALLBUSINESS
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_SMALLBUSINESS
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Microsoft Small Business Server is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_BACKOFFICE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0129
Return Variable=3VER_SUITE_BACKOFFICE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_BACKOFFICE
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_BACKOFFICE
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_BACKOFFICE
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Microsoft BackOffice components are installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_TERMINAL
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0127
Return Variable=3VER_SUITE_TERMINAL
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_TERMINAL
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_TERMINAL
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_TERMINAL
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Terminal Services is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_ENTERPRISE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0130
Return Variable=3VER_SUITE_ENTERPRISE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_ENTERPRISE
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_ENTERPRISE
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_ENTERPRISE
Value=1
end
item: If/While Statement
Variable=OS
Value=Windows NT 4.0
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows NT 4.0 Enterprise Edition is installed.
Flags=00000001
end
item: ElseIf Statement
Variable=OS
Value=Windows 2000
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows 2000 Advanced Server is installed.
Flags=00000001
end
item: ElseIf Statement
Variable=OS
Value=Windows Server 2003 family
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 Enterprise Edition is installed.
Flags=00000001
end
item: End Block
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SMALLBUSINESS_RESTRICTED
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0126
Return Variable=3SMALLBUSINESS_RESTRICTED
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30SMALLBUSINESS_RESTRICTED
Argument List=310
Argument List=0131
Return Variable=3SMALLBUSINESS_RESTRICTED
Flags=00100000
end
item: If/While Statement
Variable=SMALLBUSINESS_RESTRICTED
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Microsoft Small Business Server is installed with the restrictive client license in force.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_DATACENTER
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0124
Return Variable=3VER_SUITE_DATACENTER
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_DATACENTER
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_DATACENTER
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_DATACENTER
Value=1
end
item: If/While Statement
Variable=OS
Value=Windows 2000
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows 2000 Datacenter Server is installed.
Flags=00000001
end
item: ElseIf Statement
Variable=OS
Value=Windows Server 2003 family
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 Datacenter Edition is installed.
Flags=00000001
end
item: End Block
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_PERSONAL
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0122
Return Variable=3VER_SUITE_PERSONAL
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_PERSONAL
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_PERSONAL
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_PERSONAL
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows XP Home Edition is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_BLADE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0121
Return Variable=3VER_SUITE_BLADE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_BLADE
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_BLADE
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_BLADE
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 Web Edition is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SECURITY_APPLIANCE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0119
Return Variable=3SECURITY_APPLIANCE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30SECURITY_APPLIANCE
Argument List=310
Argument List=0131
Return Variable=3SECURITY_APPLIANCE
Flags=00100000
end
item: If/While Statement
Variable=SECURITY_APPLIANCE
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 is installed as a hardened operating system as part of a security appliance.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Set Variable
Variable=OS
Value=%OS%
end
item: Set Variable
Variable=BUILDNUMBER
Value=%BUILDNUMBER%
end
item: Set Variable
Variable=PRODUCTTYPE
Value=%PRODUCTTYPE%
end
item: Set Variable
Variable=CSDVERSION
Value=%CSDVERSION%
end
item: Set Variable
Variable=SERVICEPACKMAJOR
Value=%SERVICEPACKMAJOR%
end
item: Set Variable
Variable=SERVICEPACKMINOR
Value=%SERVICEPACKMINOR%
end
item: Remark
end
item: Remark
end
item: Display Message
Title=Result
Text=Operating System: %OS%
Text=Build Number: %BUILDNUMBER%
Text=ServicePack: %CSDVERSION% (Major:%SERVICEPACKMAJOR%, Minor:%SERVICEPACKMINOR%)
Text=
Text=Type: %PRODUCTTYPE%
Text=Installed Suites: %SUITECOUNT%%SUITES%
Text=
Text=
Flags=00100100
end
item: Else Statement
end
item: Display Message
Title=Error.
Text=Unable to obtain version information.
Flags=00110000
end
item: End Block
end
Get OS Info-action.wse
item: Remark
Text=Get Operating System Info
end
item: Remark
Text=
end
item: Remark
Text=Scriptname : Get OS Info-action.WSE
end
item: Remark
Text=Script type : Action
end
item: Remark
Text=Author : J. Huijgens
end
item: Remark
Text=Purpose : Obtain all Operatin System Information.
end
item: Remark
Text=Date : 28/02/2002
end
item: Remark
Text=
end
item: Remark
Text=Changes
end
item: Remark
Text=Date (28/06/05): Added support for Windows XP (Prof & Home), Windows 2003 and all available product suites.
end
item: Remark
Text=Date (dd/mm/yy): Reason for program changes
end
item: Remark
Text==================================================================================
end
item: Remark
end
item: Remark
Text=Execute the function.
end
item: Call DLL Function
Pathname=%SYS32%\Kernel32.dll
Function Name=GetVersionExA
Argument List=r1156
Argument List=³0MAJORVERSION
Argument List=³0MINORVERSION
Argument List=³0BUILDNUMBER
Argument List=³0PLATFORMID
Argument List=¹0 CSDVERSION
Argument List=±0SERVICEPACKMAJOR
Argument List=±0SERVICEPACKMINOR
Argument List=°0SUITEMASK
Argument List=°0PRODUCTTYPE
Argument List=°0RESERVED
Return Variable=2RESULT
Flags=00100000
end
item: If/While Statement
Variable=RESULT
Value=0
Flags=00000001
end
item: Remark
end
item: Remark
Text================ Determine Operating System ===============
end
item: Remark
end
item: If/While Statement
Variable=MAJORVERSION
Value=3
end
item: Remark
Text=Windows NT 3.51
end
item: Set Variable
Variable=OS
Value=Windows NT 3.51
end
item: End Block
end
item: Remark
end
item: If/While Statement
Variable=MAJORVERSION
Value=4
end
item: Remark
Text=Windows 95,Windows 98,Windows Me,Windows NT 4.0
end
item: If/While Statement
Variable=MINORVERSION
Value=0
end
item: Remark
Text=Windows 95, Windows NT 4.0
end
item: If/While Statement
Variable=PLATFORMID
Value=1
end
item: Remark
Text=Windows 95
end
item: Set Variable
Variable=OS
Value=Windows 95
end
item: ElseIf Statement
Variable=PLATFORMID
Value=2
end
item: Remark
Text=Windows NT 4.0
end
item: Set Variable
Variable=OS
Value=Windows NT 4.0
end
item: End Block
end
item: ElseIf Statement
Variable=MINORVERSION
Value=10
end
item: Remark
Text=Windows 98
end
item: Set Variable
Variable=OS
Value=Windows 98
end
item: ElseIf Statement
Variable=MINORVERSION
Value=90
end
item: Remark
Text=Windows ME
end
item: Set Variable
Variable=OS
Value=Windows ME
end
item: End Block
end
item: End Block
end
item: Remark
end
item: If/While Statement
Variable=MAJORVERSION
Value=5
end
item: Remark
Text=Windows 2000,Windows XP,Windows Server 2003 family
end
item: If/While Statement
Variable=MINORVERSION
Value=0
end
item: Remark
Text=Windows 2000
end
item: Set Variable
Variable=OS
Value=Windows 2000
end
item: ElseIf Statement
Variable=MINORVERSION
Value=1
end
item: Remark
Text=Windows XP
end
item: Set Variable
Variable=OS
Value=Windows XP
end
item: ElseIf Statement
Variable=MINORVERSION
Value=2
end
item: Remark
Text=Windows Server 2003 family
end
item: Set Variable
Variable=OS
Value=Windows Server 2003 family
end
item: End Block
end
item: End Block
end
item: Remark
end
item: Remark
end
item: Remark
Text================ Determine Product Type ===============
end
item: Remark
end
item: If/While Statement
Variable=PRODUCTTYPE
Value=1
end
item: Set Variable
Variable=PRODUCTTYPE
Value=Workstation
end
item: ElseIf Statement
Variable=PRODUCTTYPE
Value=2
end
item: Set Variable
Variable=PRODUCTTYPE
Value=Domain Controller
end
item: ElseIf Statement
Variable=PRODUCTTYPE
Value=3
end
item: Set Variable
Variable=PRODUCTTYPE
Value=Server
end
item: End Block
end
item: Remark
end
item: Remark
end
item: Remark
Text================ Determine Suite Mask ===============
end
item: Remark
end
remarked item: Set Variable
Variable=SUITEMASK
Value=%SUITEMASK%
end
item: Set Variable
Variable=SUITECOUNT
Value=0
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SINGLEUSERTS
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0123
Return Variable=3VER_SUITE_SINGLEUSERTS
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_SINGLEUSERTS
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_SINGLEUSERTS
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_SINGLEUSERTS
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. A very limited form of Terminal Services is installed, for supporting the remote desktop.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SMALLBUSINESS
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_SMALLBUSINESS
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_SMALLBUSINESS
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_SMALLBUSINESS
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_SMALLBUSINESS
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Microsoft Small Business Server is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_BACKOFFICE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0129
Return Variable=3VER_SUITE_BACKOFFICE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_BACKOFFICE
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_BACKOFFICE
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_BACKOFFICE
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Microsoft BackOffice components are installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_TERMINAL
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0127
Return Variable=3VER_SUITE_TERMINAL
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_TERMINAL
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_TERMINAL
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_TERMINAL
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Terminal Services is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_ENTERPRISE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0130
Return Variable=3VER_SUITE_ENTERPRISE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_ENTERPRISE
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_ENTERPRISE
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_ENTERPRISE
Value=1
end
item: If/While Statement
Variable=OS
Value=Windows NT 4.0
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows NT 4.0 Enterprise Edition is installed.
Flags=00000001
end
item: ElseIf Statement
Variable=OS
Value=Windows 2000
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows 2000 Advanced Server is installed.
Flags=00000001
end
item: ElseIf Statement
Variable=OS
Value=Windows Server 2003 family
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 Enterprise Edition is installed.
Flags=00000001
end
item: End Block
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SMALLBUSINESS_RESTRICTED
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0126
Return Variable=3SMALLBUSINESS_RESTRICTED
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30SMALLBUSINESS_RESTRICTED
Argument List=310
Argument List=0131
Return Variable=3SMALLBUSINESS_RESTRICTED
Flags=00100000
end
item: If/While Statement
Variable=SMALLBUSINESS_RESTRICTED
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Microsoft Small Business Server is installed with the restrictive client license in force.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_DATACENTER
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0124
Return Variable=3VER_SUITE_DATACENTER
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_DATACENTER
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_DATACENTER
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_DATACENTER
Value=1
end
item: If/While Statement
Variable=OS
Value=Windows 2000
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows 2000 Datacenter Server is installed.
Flags=00000001
end
item: ElseIf Statement
Variable=OS
Value=Windows Server 2003 family
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 Datacenter Edition is installed.
Flags=00000001
end
item: End Block
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_PERSONAL
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0122
Return Variable=3VER_SUITE_PERSONAL
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_PERSONAL
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_PERSONAL
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_PERSONAL
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows XP Home Edition is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_BLADE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0121
Return Variable=3VER_SUITE_BLADE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30VER_SUITE_BLADE
Argument List=310
Argument List=0131
Return Variable=3VER_SUITE_BLADE
Flags=00100000
end
item: If/While Statement
Variable=VER_SUITE_BLADE
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 Web Edition is installed.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=This will filter the VER_SUITE_SECURITY_APPLIANCE
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftLeft
Argument List=30SUITEMASK
Argument List=310
Argument List=0119
Return Variable=3SECURITY_APPLIANCE
Flags=00100000
end
item: Call DLL Function
Pathname=%SYS32%\NTDLL.DLL
Function Name=RtlLargeIntegerShiftRight
Argument List=30SECURITY_APPLIANCE
Argument List=310
Argument List=0131
Return Variable=3SECURITY_APPLIANCE
Flags=00100000
end
item: If/While Statement
Variable=SECURITY_APPLIANCE
Value=1
end
item: Set Variable
Variable=SUITECOUNT
Value=%SUITECOUNT%
Flags=00000100
end
item: Set Variable
Variable=SUITES
Value=%CRLF%%SUITECOUNT%. Windows Server 2003 is installed as a hardened operating system as part of a security appliance.
Flags=00000001
end
item: End Block
end
item: Remark
end
item: Remark
Text=Copy var's into .. eeuuhh... var's? ;-)
end
item: Set Variable
Variable=CSDVERSION
Value=%CSDVERSION%
end
item: Set Variable
Variable=%_OS_%
Value=%OS%
end
item: Set Variable
Variable=%_BUILD_%
Value=%BUILDNUMBER%
end
item: Set Variable
Variable=%_OSTYPE_%
Value=%PRODUCTTYPE%
end
item: Set Variable
Variable=%_SP_%
Value=%CSDVERSION%
end
item: Set Variable
Variable=%_SPMAJ_%
Value=%SERVICEPACKMAJOR%
end
item: Set Variable
Variable=%_SPMIN_%
Value=%SERVICEPACKMINOR%
end
item: Set Variable
Variable=%_SUITES_%
Value=%SUITES%
end
item: Remark
end
item: Else Statement
end
item: Remark
Text=Unable to obtain version information.
end
item: End Block
end
item: Remark
end
Legacy ID
24066
Article URL http://www.symantec.com/docs/HOWTO4009
Terms of use for this information are found in Legal Notices









Thank you.