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. General Programming
  3. Hardware & Devices
  4. WMI Newb Question-- Can I update set properties within a class instance, without calling the class methods? [modified]

WMI Newb Question-- Can I update set properties within a class instance, without calling the class methods? [modified]

Scheduled Pinned Locked Moved Hardware & Devices
csharpquestionvisual-studiocomsysadmin
1 Posts 1 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.
  • R Offline
    R Offline
    R_L_H
    wrote on last edited by
    #1

    Ok, I am extremely new to WMI. In fact, what I know about it is what I've learned in the past couple hours while trying to solve a hardware related problem. What I would like to do is get a particular instance of a WMI class (Win32_NetworkAdapterConfiguration), cache the current settings on a users computer, change certain settings, run my operation, and then restore the original WMI class instance. After reading up on the Win32_NetworkAdapterConfiguration from here[^], I have found that there are functions that can change the settings I am interested in modifying. My fear is, however, that since this application will be used on various systems with different hardware devices and original network settings that I will call a function that may have an unexpected consequences which I may not be able to restore (or know how to restore.) So, my thought is that I'd much rather take a snapshot of the users network configurations, make my changes and do what I need to do and then do a complete restore of the user's original network adapter configuration. Is this possible through WMI and, if so, is it advisable? -- Sorry, I forgot to mention. I am implementing this within a C# application. I can interpret code in just about any language, but this needs to be a .Net solution.

    modified on Thursday, May 20, 2010 9:25 AM

    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