OSVERSION Function
[This topic is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders. There may be some display and formatting issues until the look and feel is finalized.]
Gets a string that contains the name and version of the operating system or operating environment.
String := OSVERSION
Property Value/Return Value
Type: Text constant or code
Specifies the type and version of the operating system or operating environment. The following table shows examples.
Operating system | Return value |
---|---|
Windows XP |
Windows_NT_5.1 |
Windows Server 2003 |
Windows_NT_5.2 |
Windows Vista |
Windows_NT_6.0.1 |
Windows Server 2008 (domain controller) |
Windows_NT_6.0.2 |
Windows Server 2008 |
Windows_NT_6.0.3 |
Remarks
This function is not supported in the RoleTailored client.
Example
This example shows how to use the OSVERSION function.
This example requires that you create the following text constant in the C/AL Globals window.
Text constant | ENU value |
---|---|
Text000 |
'The operating system is: %1' |
Ver := OSVERSION;
MESSAGE(Text000, Ver);
The following is a typical result:
The operating system is: Windows_NT_6.0.1
See Also
Reference
APPLICATIONPATH Function
COMMANDLINE Function
ENVIRON Function
GUIALLOWED Function
HYPERLINK Function
SHELL Function
SLEEP Function
TEMPORARYPATH Function