OSVERSION Function
Microsoft Dynamics Nav 2009
Returns a string which contains the name and version of the operating system or operating environment.
String := OSVERSION
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 |
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
Community Additions
ADD
Show: