Solved

Use PSEXEC to get OS Version of Remote machine

Posted on 2009-05-05
4
1,801 Views
Last Modified: 2013-11-10
I recently asked a question regarding how to login (programatically) to a remote machine and find out the remote machine's OS version.  'arnold' had replied.  But then we had decided we didn't need it.  Anyway now, I have been asked to use "psexec' to retrieve the OS version of a bunch of remote machines which in my program will be in an arraylist.  My program is a console application in VB.Net.

I have never done anything like this.  I need help from someone who can show me how to read from an arraylist of computer names, use 'psexec' to login to the remote machine and run a command that would return the OS Version of that machine.  I would really appreciate it.  
0
Comment
Question by:msyed1
  • 2
4 Comments
 

Author Comment

by:msyed1
ID: 24309135
This was the question I had asked earlier:
http://www.experts-exchange.com/Programming/Languages/Q_24366041.html 
0
 
LVL 15

Assisted Solution

by:veedar
veedar earned 200 total points
ID: 24309631
Also check out psinfo from the same maker of psexec and part of the pstools suite. It will give you OS version plus other info.
0
 
LVL 4

Accepted Solution

by:
daluu earned 300 total points
ID: 24311449
veedar has a good suggestion to use psinfo.exe. If you want a more integrated solution, you might want to look into WMI (Windows Management Instrumentation) with .NET.

WMI is easier to use with VBScript I think, but it will work with .NET, C#, and VB.NET. You just need to do some research on using WMI with .NET.

Here's a reference on using WMI to get OS info in VBScript. The API calls for the .NET equivalent would be similar, though syntax would be slightly different.

http://www.computerperformance.co.uk/vbscript/wmi_secrets.htm#Example_2_-_WMI_Script_to_Obtain_Information_about_the_Operating_System_
0
 

Author Closing Comment

by:msyed1
ID: 31578229
veedar, daluu: Since I don't know WMI, I did it using a .Net Console application.  Opened a DOS prompt from the program and ran the PSINFO, then parsed the results.  Thanks.  Also, please see if you can help me with my new Question that I just opened:
http://www.experts-exchange.com/Security/Misc/Q_24389330.html   
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help making a program or form for inventory that exports to txt 8 43
Cygwin - GNU GPL License 1 35
Query Syntax 17 42
Programming Codes 2 20
This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question