Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. WMI / system information

WMI / system information

Scheduled Pinned Locked Moved System Admin
tutorialdatabasewindows-adminperformancehelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1540387
    wrote on last edited by
    #1

    Hi. I'm new to WMI, nd I'm trying to create an application that pings a computer and get the following information: - IP adress - Domain - UserName - Time since last boot - Memory - CPU - OS Version - Service pack version - Current pingtime (datetime.now). I'm using both the registry and WMI to get the needed information, but I would like to know if anyone could help me writing - or guide me to create a WMI call that would get all that information? I'm selecting the host from a database, and the data is afterword stored in the same table. Also, if I could get some help reading an OU in a Domain to list all hosts - I know the path to the ou, but not how to read data fromm it. Regards Jan.

    H R 3 Replies Last reply
    0
    • U User 1540387

      Hi. I'm new to WMI, nd I'm trying to create an application that pings a computer and get the following information: - IP adress - Domain - UserName - Time since last boot - Memory - CPU - OS Version - Service pack version - Current pingtime (datetime.now). I'm using both the registry and WMI to get the needed information, but I would like to know if anyone could help me writing - or guide me to create a WMI call that would get all that information? I'm selecting the host from a database, and the data is afterword stored in the same table. Also, if I could get some help reading an OU in a Domain to list all hosts - I know the path to the ou, but not how to read data fromm it. Regards Jan.

      H Offline
      H Offline
      Hari Om Prakash Sharma
      wrote on last edited by
      #2

      Member 1541838 wrote:

      that pings a computer

      Do you want to access remote computer information or local system? for local system details: OS version: System.Environment.OSVersion.ToString () USER NAME: System.Windows.Forms.SystemInformation.UserName OR Environment.UserName IP ADDRESS: http://www.codeproject.com/KB/cs/network.aspx[^] http://www.c-sharpcorner.com/UploadFile/mahesh/get_ip11152005064604AM/get_ip.aspx[^] http://www.netomatix.com/MachineIp.aspx[^]

      First and the Foremost: FIGHT TO WIN
      MySite:
      HariOmPrakash.InFo

      1 Reply Last reply
      0
      • U User 1540387

        Hi. I'm new to WMI, nd I'm trying to create an application that pings a computer and get the following information: - IP adress - Domain - UserName - Time since last boot - Memory - CPU - OS Version - Service pack version - Current pingtime (datetime.now). I'm using both the registry and WMI to get the needed information, but I would like to know if anyone could help me writing - or guide me to create a WMI call that would get all that information? I'm selecting the host from a database, and the data is afterword stored in the same table. Also, if I could get some help reading an OU in a Domain to list all hosts - I know the path to the ou, but not how to read data fromm it. Regards Jan.

        H Offline
        H Offline
        Hari Om Prakash Sharma
        wrote on last edited by
        #3

        GET OS INFORMATION you have to use ManagementClass to access system details System.Management.ManagementClass managementClass = new System.Management.ManagementClass("Win32_OperatingSystem"); foreach (System.Management.ManagementObject managementObject in managementClass.GetInstances()) { str1 = managementObject["Manufacturer"].ToString(); str2 = managementObject["Version"].ToString(); str3 = managementObject["Caption"].ToString(); }

        First and the Foremost: FIGHT TO WIN
        MySite:
        HariOmPrakash.InFo

        1 Reply Last reply
        0
        • U User 1540387

          Hi. I'm new to WMI, nd I'm trying to create an application that pings a computer and get the following information: - IP adress - Domain - UserName - Time since last boot - Memory - CPU - OS Version - Service pack version - Current pingtime (datetime.now). I'm using both the registry and WMI to get the needed information, but I would like to know if anyone could help me writing - or guide me to create a WMI call that would get all that information? I'm selecting the host from a database, and the data is afterword stored in the same table. Also, if I could get some help reading an OU in a Domain to list all hosts - I know the path to the ou, but not how to read data fromm it. Regards Jan.

          R Offline
          R Offline
          ruready511
          wrote on last edited by
          #4

          Jan, I think this will help out a lot. It helped me, because sometimes WMI can be a nightmare... WMI Code Creator v1.0[^] -David

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups