Home
> Commands A-M
> Batch G
GETTYPE
Description
| Syntax
| Parameters
| Switches
| Related
| Notes
| Examples
| Errorlevels
| Availability
Sets the system environment variable
%ERRORLEVEL%
to the value associated with the specified Windows
operating system.
Syntax
GETTYPE
/?
GETTYPE
[/s computer
[/u [Domain\]User
[/p [password]]]]
[/build
| /majv
| /minv
| /role
| /sp
| /type
| /ver]
Parameters
none.
Switches
- /?
(NT2003)
- Displays help.
- /build
(NT2003)
- Returns the build number of the operating system
that is installed.
- /majv
(NT2003)
- Returns only major version.
- /minv
(NT2003)
- Returns only minor version.
- /p [password]
(NT2003)
- Specifies the password of the user account that is
specified in /u.
- /role
(NT2003)
- Returns the role of the operating system.
- Determined by querying the registry:
- 1 Domain controller
- 2 Member server
- 3 Workgroup
- /s computer
(NT2003)
- Specifies the name or IP address of a remote computer
(do not use backslashes). The default is the local computer.
- /sp
(NT2003)
- Returns the latest service pack installed.
- 0 NO service pack
- 1 Service pack 1
- /type
(NT2003)
- Returns the type of operating system that is
installed.
- Determined by querying the registry:
- 1 Windows XP Home Edition
- 2 Windows XP Professional
- 3 Windows Server 2003, Standard Edition
- 4 Windows Server 2003, Enterprise Edition
- 5 Windows Server 2003, Datacenter Edition
- 6 Windows Server 2003, Web Edition
- /u [Domain\]User
(NT2003)
- Runs the command with the account permissions of the
user specified by User or Domain\User. The default is the
system permissions.
- /ver
(NT2003)
- Returns version information.
- 5100 Major version 5, minor version 1
Related
none.
Notes
none.
Examples
none.
Errorlevels
- /majv
- 255 error
- 5000 Major version 5
- /minv
- 100 Minor version 1
- 255 error
- /role
- 1 Domain controller
- 2 Member server
- 3 Workgroup
- 255 error
- /sp
- 0 NO service pack
- 1 Service pack 1
- 255 error
- /type
- 1 Windows XP Home Edition
- 2 Windows XP Professional
- 3 Windows Server 2003, Standard Edition
- 4 Windows Server 2003, Enterprise Edition
- 5 Windows Server 2003, Datacenter Edition
- 6 Windows Server 2003, Web Edition
- 255 error
- /ver
- 255 error
- 5100 Major version 5, minor version 1
Availability
- External
-
- DOS
-
none
- Windows
-
none
- Windows NT
-
NT2003
Last Updated: 2003/07/28
Direct corrections or suggestions to:
Rick Lively