OperatingSystem Class for Remote Computer,...

  • Thread starter Thread starter Kerem Gümrükcü
  • Start date Start date
K

Kerem Gümrükcü

Hi,

is it possible to get the Information that comes from OperatingSystem Class
from a Remote Comupter. Is there a remote information supporting
OperatingSystem
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

--
 
Kerem Gümrükcü said:
Hi,

is it possible to get the Information that comes from OperatingSystem Class
from a Remote Comupter. Is there a remote information supporting
OperatingSystem
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

I think you usuallu use WMI for getting that kind of information remotely.
Have you considered Win32_OperatingSystem?
 
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 OperatingSystemEx {

private string machineName;

private Version version;

private PlatformID platformId;

public OperatingSystemEx(string TargetMachine){

this.machineName = TargetMachine;

try

{

this.platformId = PlatformID.Win32NT;

try

{

string VersionString = (string)
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,
TargetMachine).OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion",
false).GetValue("CurrentVersion", "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(Environment.OSVersion.VersionString);

}

}

catch (Exception)

{

this.platformId = PlatformID.Win32NT;

this.version = new Version(Environment.OSVersion.VersionString);

}

}


public System.Version Version{

get{ return this.version; }

}

public System.PlatformID 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

--
 
Kerem Gümrükcü said:
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:
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


Sorry, still on Windows XP here.

You are right of course, WMI can get very slow, especially when trying to
connect to a remote machine that is not available, I always use some kind of
ping before attempting connection.
 
Hi,

is it possible to get the Information that comes from OperatingSystem Class
from a Remote Comupter. Is there a remote information supporting
OperatingSystem
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

Why do you not want to use WMI?

Net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top