Is it possible to programmatically uninstall a device in windows and perform a 'scan for hardware changes' programmatically? Is there an开发者_如何转开发y VB script that can be used for the same? Or is there any windows API that can be called to achieve the same?
To force the 'scan for hardware changes' checkout "How To Force Reenumeration of a Device Tree From an Application" the sample there shows how to force the entire tree to be re-enumerated.
As to removing a driver checkout DiUninstallDevice.
精彩评论