Does anyone have any information regarding the uninstallation of the ndis im
driver programmatically? When removing a device (used passthru as an
example) using the SetupDiCallClassInstaller's DIF_REMOVE command, the class
installer fails to access the device. Manually one can remove it via the
network adapter's service, however it cannot even be uninstalled manually via
the device manager. So is there perhaps another method used? Any additional
guidance would be appreciated!

snippet from the setupapi.log:
#-147 Loading class installer module for "Passthru Miniport".
#V132 File "C:\WINDOWS\INF\certclas.inf" (key "certclas.inf") is signed in
catalog
"C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\NT5INF.CAT".
#V286 Verification using alternate platform (Platform = 2, High Version =
5.1, Low Version = 5.0).
#V132 File "C:\WINDOWS\system32\NetCfgx.dll" (key "NetCfgx.dll") is signed
in catalog
"C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\NT5.CAT".
#-166 Device install function: DIF_REMOVE.
#E154 Class installer failed. Error 5: Access is denied.

Thanks!

RE: uninstall an intermediate network filter driver? by micheler

micheler
Tue Mar 13 22:07:05 CDT 2007

Also have tried using the devcon utility in the WDK to delete the device, but
it causes the same error. If I call SetupDiRemoveDevice, the handler for
this installation request, I am able to remove the device node itself,
however it does not delete the device completely leaving non-functional
network devices.

Re: uninstall an intermediate network filter driver? by Thomas

Thomas
Tue Mar 13 22:32:40 CDT 2007

Examine the DDK BindView sample application (includes source). It can
programatically install and uninstall network components. After verifying
that it works you can adapt it to suit your specific needs.

There is a sample installer/uninstaller for NDIS protocol drivers on
NDIS.com at the URL:

http://ndis.com/papers/ndisinstall/programinstall.htm

TheProtInstall tool is basically a command-line version of the BindView code
that has been distilled down to specifically install only NDIS protocols.
PrtoInstall can be adapted to install/uninstall NDIS IM drivers if it is
extended slightly to deal with a the IM miniport in addition to the
protocol.

Neither the Device Manager nor DevCon should be used to install or uninstall
network components.

Good luck,

Thomas F. Divine

"micheler" <micheler@discussions.microsoft.com> wrote in message
news:FD98AF0B-4DAC-464E-90F3-078AE7947022@microsoft.com...
> Does anyone have any information regarding the uninstallation of the ndis
> im
> driver programmatically? When removing a device (used passthru as an
> example) using the SetupDiCallClassInstaller's DIF_REMOVE command, the
> class
> installer fails to access the device. Manually one can remove it via the
> network adapter's service, however it cannot even be uninstalled manually
> via
> the device manager. So is there perhaps another method used? Any
> additional
> guidance would be appreciated!
>
> snippet from the setupapi.log:
> #-147 Loading class installer module for "Passthru Miniport".
> #V132 File "C:\WINDOWS\INF\certclas.inf" (key "certclas.inf") is signed in
> catalog
> "C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\NT5INF.CAT".
> #V286 Verification using alternate platform (Platform = 2, High Version =
> 5.1, Low Version = 5.0).
> #V132 File "C:\WINDOWS\system32\NetCfgx.dll" (key "NetCfgx.dll") is signed
> in catalog
> "C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\NT5.CAT".
> #-166 Device install function: DIF_REMOVE.
> #E154 Class installer failed. Error 5: Access is denied.
>
> Thanks!


Re: uninstall an intermediate network filter driver? by micheler

micheler
Tue Mar 13 23:39:08 CDT 2007

Is there a method to do this using the SetupDixx API? DIF_REMOVE should
work based on my understanding, however I have no been able to get it to
function.


Re: uninstall an intermediate network filter driver? by pavel_a

pavel_a
Wed Mar 14 08:16:15 CDT 2007

"micheler" wrote:
> Is there a method to do this using the SetupDixx API? DIF_REMOVE should
> work based on my understanding, however I have no been able to get it to
> function.

Please look at the BindView code, as Thomas suggests.
You want to use INetCfg instead of SetupDi .

--PA


Re: uninstall an intermediate network filter driver? by micheler

micheler
Wed Mar 14 15:41:10 CDT 2007

During my research I had read somewhere that with Vista the SetupDi Api's
were now no longer going to be a recommended for use, but enforced. Is this
not applicable to NDIS IM driver installation? Also, examining the APIs used
during manual installation, the SetupDI DIF_REMOVE actually will use INetCfg
under the covers. I am still unclear WHY exactly the SetupDi API's
DIF_REMOVE in my code is not functioning, nor why I would choose to implement
this functionality using INetCfg.

"Pavel A." wrote:

> "micheler" wrote:
> > Is there a method to do this using the SetupDixx API? DIF_REMOVE should
> > work based on my understanding, however I have no been able to get it to
> > function.
>
> Please look at the BindView code, as Thomas suggests.
> You want to use INetCfg instead of SetupDi .
>
> --PA
>

Re: uninstall an intermediate network filter driver? by Thomas

Thomas
Wed Mar 14 17:47:31 CDT 2007


"micheler" <micheler@discussions.microsoft.com> wrote in message
news:57F4AA1E-D8C7-4DB7-9192-8B73CBD5B4B1@microsoft.com...
> During my research I had read somewhere that with Vista the SetupDi Api's
> were now no longer going to be a recommended for use, but enforced. Is
> this
> not applicable to NDIS IM driver installation? Also, examining the APIs
> used
> during manual installation, the SetupDI DIF_REMOVE actually will use
> INetCfg
> under the covers. I am still unclear WHY exactly the SetupDi API's
> DIF_REMOVE in my code is not functioning, nor why I would choose to
> implement
> this functionality using INetCfg.
[PCAUSA] You have our best advice. You have been given guidance to use the
INetCgf API from folks who install a lot of network drivers. If you want to
try other things, then I'm sure that you will learn helpful things along the
way (but they will not solve your problem).

Good luck to you!

Thomas F. Divine
>
> "Pavel A." wrote:
>
>> "micheler" wrote:
>> > Is there a method to do this using the SetupDixx API? DIF_REMOVE
>> > should
>> > work based on my understanding, however I have no been able to get it
>> > to
>> > function.
>>
>> Please look at the BindView code, as Thomas suggests.
>> You want to use INetCfg instead of SetupDi .
>>
>> --PA
>>