\n Hi Guys, \nI’m having an issue using my.computer in VS 2022. I’m trying to use it to gather some basic information about the computer. I’ve used it before without any issues. Now I’m getting an error saying ‘Computer’ is not a member of ‘System_Explorer_Core.My’. Not sure what is going on. Any help you can offer is appreciated.\n <\/blockquote>\n<\/aside>\n\nYou’ve only supplied part of the code and no real information about your objective, so it’s a bit harder to help you get where you want to be.<\/p>\n
See my update on your other topic.<\/p>","upvoteCount":0,"datePublished":"2025-04-06T07:58:31.571Z","url":"https://community.spiceworks.com/t/duplicate-windows-device-manager-using-vs/1193541/2","author":{"@type":"Person","name":"Rod-IT","url":"https://community.spiceworks.com/u/Rod-IT"}},{"@type":"Answer","text":"
Hey Rod, I didn’t think I needed to go into detail about what I’m working on. I was just trying to fix an error that didn’t make sense given that the same code has worked in the past. I have pulled an old project out of mothballs and started working on it again. Part of the project is to gather as much configuration data about the PC as I can and write it to a database. This is one of the pieces of information that I want to include in the database. I like to be able to return a set of values similar to the Windows 11 About screen. There are other things as well, hard drive information, PC hardware information, device manager information, services, and other things. The goal is to capture the data, write it to a database, then write the routines to pull it back based on computer name or some other search key. Hope this helps<\/p>","upvoteCount":0,"datePublished":"2025-04-06T12:18:27.643Z","url":"https://community.spiceworks.com/t/duplicate-windows-device-manager-using-vs/1193541/3","author":{"@type":"Person","name":"vincentshanecurtis","url":"https://community.spiceworks.com/u/vincentshanecurtis"}},{"@type":"Answer","text":"
Ensure you have added a reference to System.Management <\/code> and then you can take advantage of using WMI.<\/p>\nImports System.Management\nImports System.Text\n\nModule moduleWMIInfo\n\n Public Function GetWMIClass(wmiClass As String) As String\n\n Dim stringBuilderOutput As New StringBuilder(String.Empty)\n\n Try\n Dim managemenClass As New ManagementClass(wmiClass)\n Dim managementObjectCollection As ManagementObjectCollection = _\n managemenClass.GetInstances()\n Dim propertyDataCollection As PropertyDataCollection = managemenClass.Properties\n\n For Each managementObject As ManagementObject In managementObjectCollection\n For Each propertyData As PropertyData In propertyDataCollection\n Try\n stringBuilderOutput.AppendLine(propertyData.Name + \": \" + _\n managementObject.Properties(propertyData.Name).Value)\n\n Catch\n ' Handle your error here\n End Try\n Next\n stringBuilderOutput.AppendLine()\n Next\n\n Catch\n ' Handle your error here\n End Try\n\n Return stringBuilderOutput.ToString()\n End Function\nEnd Module\n\n' Example usage:\n' Dim strOSInfo As String\n' strOSInfo = GetWMIClass(\"Win32_SystemOperatingSystem\")\n<\/code><\/pre>\n*Edit: codestyle<\/p>","upvoteCount":0,"datePublished":"2025-04-07T15:30:11.114Z","url":"https://community.spiceworks.com/t/duplicate-windows-device-manager-using-vs/1193541/4","author":{"@type":"Person","name":"fallen-it","url":"https://community.spiceworks.com/u/fallen-it"}},{"@type":"Answer","text":"
Thanks for the suggestion, but there is no WMI in my project so far and I’d like to keep it that way. I think there is a problem with it on my system and that is what is causing the problem.<\/p>","upvoteCount":0,"datePublished":"2025-04-07T16:11:30.541Z","url":"https://community.spiceworks.com/t/duplicate-windows-device-manager-using-vs/1193541/5","author":{"@type":"Person","name":"vincentshanecurtis","url":"https://community.spiceworks.com/u/vincentshanecurtis"}}]}}
Hello,
Does anyone know of any existing source code that replicates Windows Device Manager using Visual Studio? I would prefer VB but I can always convert C# to VB. I have found a few but they did not include a form that displayed the final product so I don’t know if they actually work.
Any help you can provide is appreciated
2 Spice ups
Rod-IT
(Rod-IT)
April 6, 2025, 7:58am
2
This looks like a different question to your existing topic.
Hi Guys,
I’m having an issue using my.computer in VS 2022. I’m trying to use it to gather some basic information about the computer. I’ve used it before without any issues. Now I’m getting an error saying ‘Computer’ is not a member of ‘System_Explorer_Core.My’. Not sure what is going on. Any help you can offer is appreciated.
You’ve only supplied part of the code and no real information about your objective, so it’s a bit harder to help you get where you want to be.
See my update on your other topic.
Hey Rod, I didn’t think I needed to go into detail about what I’m working on. I was just trying to fix an error that didn’t make sense given that the same code has worked in the past. I have pulled an old project out of mothballs and started working on it again. Part of the project is to gather as much configuration data about the PC as I can and write it to a database. This is one of the pieces of information that I want to include in the database. I like to be able to return a set of values similar to the Windows 11 About screen. There are other things as well, hard drive information, PC hardware information, device manager information, services, and other things. The goal is to capture the data, write it to a database, then write the routines to pull it back based on computer name or some other search key. Hope this helps
Ensure you have added a reference to System.Management
and then you can take advantage of using WMI.
Imports System.Management
Imports System.Text
Module moduleWMIInfo
Public Function GetWMIClass(wmiClass As String) As String
Dim stringBuilderOutput As New StringBuilder(String.Empty)
Try
Dim managemenClass As New ManagementClass(wmiClass)
Dim managementObjectCollection As ManagementObjectCollection = _
managemenClass.GetInstances()
Dim propertyDataCollection As PropertyDataCollection = managemenClass.Properties
For Each managementObject As ManagementObject In managementObjectCollection
For Each propertyData As PropertyData In propertyDataCollection
Try
stringBuilderOutput.AppendLine(propertyData.Name + ": " + _
managementObject.Properties(propertyData.Name).Value)
Catch
' Handle your error here
End Try
Next
stringBuilderOutput.AppendLine()
Next
Catch
' Handle your error here
End Try
Return stringBuilderOutput.ToString()
End Function
End Module
' Example usage:
' Dim strOSInfo As String
' strOSInfo = GetWMIClass("Win32_SystemOperatingSystem")
*Edit: codestyle
Thanks for the suggestion, but there is no WMI in my project so far and I’d like to keep it that way. I think there is a problem with it on my system and that is what is causing the problem.