hi all:
I need to programmatically uninstall my virtual com port drivers. (The driver for the 4 com ports have to be uninstalled followed by the bus driver that created the PDOs corresponding to the 4 virtual com ports). Note that manual install (user going into Device Manager and right clicking on the ports and then the bus components) works fine.
Since I know nothing about installers and uninstallers or setup programs, what normally has to happen here? Do I need to write a program that calls a bunch of SetupDi* APIs? Or is there a exe already in existence that does this for me? Devcon.exe? Some other program? Is there something that just will work with minimal effort?
If I need to use devcon.exe, is it going to be pretty cut and dry? Can I pass it a HW ID wildcard to with some arguments, and it will do the rest? I’ll also need to force a reboot, I saw something about reboots in devcon source code. If you happen to know what the command line parameters need to be passed, that would be appreciated as well.
If I have to write the code myself using the SetupDi* commands, do you have suggestions of which of these APIs I have to call?
Also, in general, what approaches do you all normally take when putting together uninstall programs to uninstall drivers? Do you tend to stick with one way of doing this? And, if so, why? Pros and Cons?
much thanks