public string GetOSName(Process process) { if (_osInfo == null) { _osInfo = OSHelper.GetComputerDescription(); } return(_osInfo.ProductName); }
protected override IUnixWbemClassHandler Build(object nativeObj) { return(base.Build(nativeObj).WithProperty(PathField, System.Net.Dns.GetHostName()) .WithMethod("Rename", new UnixCimMethodInfo { Name = "Rename" }) .WithProperty("Description", OSHelper.GetComputerDescription().ToString()) .WithProperty("Domain", GetDomain())); }
public string GetOSVersion(Process process) { if (_osInfo == null) { _osInfo = OSHelper.GetComputerDescription(); } var version = _osInfo.Version; if (!string.IsNullOrEmpty(_osInfo.BuildNumber)) { version += " " + _osInfo.BuildNumber; } return(version); }
protected override IUnixWbemClassHandler Build(object nativeObj) { return(base.Build(nativeObj).WithProperty(PathField, System.Net.Dns.GetHostName()) .WithProperty("Description", OSHelper.GetComputerDescription().ToString()));; }