473,322 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

OperatingSystem Class for Remote Computer,...

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
-----------------------
"This reply is provided as is, without warranty express or implied."
Jun 27 '08 #1
4 2407
"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
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
-----------------------
"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_OperatingSystem?
--
urkec
Jun 27 '08 #2
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.LocalMa chine,
TargetMachine).OpenSubKey(@"SOFTWARE\Microsoft\Win dows 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

--
-----------------------
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***@discussions.microsoft.comschrieb im Newsbeitrag
news:05**********************************@microsof t.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
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
-----------------------
"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_OperatingSystem?
--
urkec

Jun 27 '08 #3
"Kerem Gümrükcü" wrote:
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.

--
urkec
Jun 27 '08 #4
On Jun 14, 10:35*am, "Kerem Gümrükcü" <kareem...@hotmail.comwrote:
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
-----------------------
"This reply is provided as is, without warranty express or implied."
Why do you not want to use WMI?

Net
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bhavya Shah | last post by:
Hello All, I am facing a serious problem while copying a file to a remote computer programmatically. What I want to do: I want to connect to a remote computer and copy a file to the remote...
0
by: news.microsoft.com | last post by:
I am trying to write to the registry of a remote computer that is not on a domain from a computer that is on a domain. I am trying to impersonate an administrator account that is on this remote...
1
by: Angelo Castigliola III | last post by:
I am trying to write to the registry of a remote computer that is not on a domain from a computer that is on a domain. I am trying to impersonate an administrator account that is on this remote...
3
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer...
1
by: Chidvilas | last post by:
// Get all processes running on the remote computer. Process remoteAll = Process.GetProcesses("XYZ"); when I am exectuing the above code, it is giving excetpion saying "Couldn't get process...
0
by: E. | last post by:
Hi, i have a problem with remote debug. my local dev computer is a win xp sp 2 (with firewall disabled). my remote server is a win 2k. Both has been configured with my account as administrator....
1
by: schaf | last post by:
Hi all! I'm still trying to start/stop a service on a remote computer. (I promiss that's the last new post because of this problem from my side) My situation: I've an application running under...
7
by: RN1 | last post by:
Is it possible to connect to my local SQL Server 2005 database from a remote web server? If yes, what ConnectionString do I use? Thanks, Ron
3
by: Yves Gagnon | last post by:
Hi, I try to debug a WCF hosted in a windows services on a serveur that is on an other domaine then my developpement machine. I tried many things without succes. Here is what I tried: First I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.