WMI Newb Question-- Can I update set properties within a class instance, without calling the class methods? [modified]
-
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