-
January 22nd, 2009, 01:47 AM
#1
WMI Help!!!
Hey all, when I try to set the following WMI property, I get the followng error: "Value out of range". I can successfully access the value but can't set it. I am trying to change the computer description. What am I doing wrong?
Dim objEv As System.Management.ManagementObjectSearcher = New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem")
For Each objMgmt As System.Management.ManagementObject In objEv.Get
objMgmt("description") = value
objMgmt.Put()
Next
whatever the value is ( for example "ASUS p5Q"), i get a "value out of range" exception when VS gets to the objMgmt.Put() function. And "description" isn't read-only according to MS.
What is wrong with this code?
Any help would be greatly appreciated. Thank you
-
January 22nd, 2009, 03:15 AM
#2
Re: WMI Help!!!
Download Scriptomatic by the Microsoft Scripting Guys to see if they do it any differently. Possibly the BIOS doesn't allow it
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|