By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,780 Members | 1,543 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,780 IT Pros & Developers. It's quick & easy.

Delete ManagementObject but exception occur

P: n/a
Hi All,

I am working on deleting disconnected devices in Device Manager.
I write codes as below but get exception that tells something like
"Provider Cannot do attempted operation"
ErrorCode is System.Management.ManagementStatus.ProviderNotCapa ble
How can I delete these connections? Thanks for any reply.

// delete all desconnected device informations first
string strQry = "Select * from Win32_NetworkAdapterConfiguration where
Description='Windows Mobile-based Device'";
ManagementObjectSearcher objDelete = new
ManagementObjectSearcher(strQry);
foreach (ManagementObject objQry in objDelete.Get())
{
objQry.Delete();
}

Adam

Jan 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.