So I am installing a driver for a USB network adapter. Is there a similar set of API's to uninstall a network adapter like printers. For example DeletePrinterDriverEx, is there a DeleteNetworkDriverEx somewhere? I haven't had luck finding anything.
Printable View
So I am installing a driver for a USB network adapter. Is there a similar set of API's to uninstall a network adapter like printers. For example DeletePrinterDriverEx, is there a DeleteNetworkDriverEx somewhere? I haven't had luck finding anything.
How about using a console?
Try to execute:
via WinExec()Code:net use [drive] /delete /yes
Source:
http://support.microsoft.com/kb/308582
It's not a network drive. It is a device that uses a network adapter to act like a network device. Almost like installing a printer as a network printer but it connects via USB for example. When it is installed it shows up in the Device Manager as a Network Adapter.
So I did an EnumServiceStatus and found the driver service. But just doind a DeleteService wont uninstall the driver will it? Thanks for all the help...
I use devcon.exe for such tasks - http://support.microsoft.com/kb/311272
gg
I need something that will be packaged into an application that is going to uninstall the entire driver. DevCon says it is to only be used for debugging purposes...I'm looking for something that is standard in the WDK/SDK (VS). If you do:
OpenSCManager
EnumServiceStats (SERVICE_DRIVER)
OpenService
QueryServiceStatus(service, &status);
ControlService(service, SERVICE_CONTROL_STOP, &status);
DeleteService(service);
will it 'uninstall' the driver service or just delete it from the services list? Is this a safe way to does this?
ggQuote:
Note The source code for DevCon is also available in the Windows DDK (which is available from http://www.microsoft.com/whdc/devtools/ddk/default.mspx (http://www.microsoft.com/whdc/devtools/ddk/default.mspx) ) under DDK root\Src\Setup\Devcon, along with documentation.