Hi urkec,
no, i wont use WMI, i just want to stay at Registry Information.
I solved this by writing that class, but i dont know how this will
work on vista, because i tested it only on 2000 up to XP. It works
fine, but i dont know how vista will provide the registry information:
//CODE
public class OperatingSystem Ex {
private string machineName;
private Version version;
private PlatformID platformId;
public OperatingSystem Ex(string TargetMachine){
this.machineNam e = TargetMachine;
try
{
this.platformId = PlatformID.Win3 2NT;
try
{
string VersionString = (string)
RegistryKey.Ope nRemoteBaseKey( RegistryHive.Lo calMachine,
TargetMachine). OpenSubKey(@"SO FTWARE\Microsof t\Windows NT\CurrentVersi on",
false).GetValue ("CurrentVersio n", "0.0");
if (VersionString != "0.0")
{
int Major = Convert.ToInt32 (VersionString. Substring(0, 1));
int Minor = Convert.ToInt32 (VersionString. Substring(2, 1));
this.version = new Version(Major, Minor);
}
}
catch (Exception)
{
this.version = new Version(Environ ment.OSVersion. VersionString);
}
}
catch (Exception)
{
this.platformId = PlatformID.Win3 2NT;
this.version = new Version(Environ ment.OSVersion. VersionString);
}
}
public System.Version Version{
get{ return this.version; }
}
public System.Platform ID Platform {
get { return this.platformId ; }
}
}
//END CODE
WMI is sometimes really slow, so i wont work with it. This solution is
good, but i dont know whether it works on vista. Can you check it, if
you have vista running please and tell me what wont work if it does not,..
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space:
http://kerem-g.spaces.live.com/
Latest Open-Source Projects:
http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
"urkec" <ur***@discussi ons.microsoft.c omschrieb im Newsbeitrag
news:05******** *************** ***********@mic rosoft.com...
"Kerem Gümrükcü" wrote:
>Hi,
is it possible to get the Information that comes from OperatingSystem
Class
from a Remote Comupter. Is there a remote information supporting
OperatingSyste m
Class or can i get this information another way, e.g. from opening remote
registry?
The target Systems are strictly Windows.
Thanks in Advance,...
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
I think you usuallu use WMI for getting that kind of information remotely.
Have you considered Win32_Operating System?
--
urkec