Description
Use the OSInfo.SystemDirectory
property to get the location of the system directory of the current operating system.
Declaration
OSInfoObj.SystemDirectory
Read-Only Property | String |
OSInfoObj | An expression, variable or parameter that specifies a reference to an OSInfo object |
Applies To
The property is applied to the following object:
Property Value
The string that represents the path to the system directory.
Example
The following example posts the path to the Windows system folder to the test log.
JavaScript, JScript
function Test()
{
var sTempFolder = Sys.OSInfo.SystemDirectory;
Log.Message(sTempFolder);
}
Python
def Test():
sTempFolder = Sys.OSInfo.SystemDirectory
Log.Message(sTempFolder)
VBScript
Sub Test
Dim sTempFolder
sTempFolder = Sys.OSInfo.SystemDirectory
Log.Message sTempFolder
End Sub
DelphiScript
procedure Test;
var sTempFolder;
begin
sTempFolder := Sys.OSInfo.SystemDirectory;
Log.Message(sTempFolder);
end;
C++Script, C#Script
function Test()
{
var sTempFolder = Sys["OSInfo"]["SystemDirectory"];
Log["Message"](sTempFolder);
}