System.Management.ManagementException' occurred in system.management.dll : DOTNET
This is a discussion on System.Management.ManagementException' occurred in system.management.dll within the DOTNET forums in Framework and Interface Programming category; I am connecting to a sms server via WMI and am also porting an app from VB6 to vb.net. In vb6 the code was as follows: Set instCollection = WbemServices.Get("SMS_Collection.CollectionID=""" & sCollectionID & """") In vb.net it changes to this: instCollection = New ManagementClass("SMS_Collection.CollectionID = """ & sCollectionID & """") but as soon as it run that line i get a "System.Management.ManagementException' occurred in system.management.dll Additional information: Invalid parameter" exception. I am not sure why. I checked and made sure all the values are correct. If I make the line as follows: instCollection = New ManagementClass("SMS_Collection") there is no error ...
| DOTNET Discussion forums related to Microsoft Dot net technologies, CSharp and other related items |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| from VB6 to vb.net. In vb6 the code was as follows: Set instCollection = WbemServices.Get("SMS_Collection.CollectionID=""" & sCollectionID & """") In vb.net it changes to this: instCollection = New ManagementClass("SMS_Collection.CollectionID = """ & sCollectionID & """") but as soon as it run that line i get a "System.Management.ManagementException' occurred in system.management.dll Additional information: Invalid parameter" exception. I am not sure why. I checked and made sure all the values are correct. If I make the line as follows: instCollection = New ManagementClass("SMS_Collection") there is no error but this doesn't return the values I need. Does anyone know what is going on and how to possibly fix this? thanks... |
![]() |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WMI and System.Management.ManagementException | usenet | DOTNET | 0 | 08-17-2007 10:26 AM |
| An unhandled exception of type 'System.ExecutionEngineException' occurred in system.management.dll | usenet | DOTNET | 1 | 04-28-2006 10:15 AM |
| System.Management.ManagementException | usenet | DOTNET | 0 | 08-03-2005 01:39 AM |
| CLR and System.Management | usenet | DOTNET | 0 | 02-28-2005 11:43 AM |
| System.Management.ManagementException: Invalid class | usenet | DOTNET | 0 | 06-22-2004 06:29 PM |




