How to install/uninstall/Update a NDIS IM driver by a Command line

Hello pals.

How can I install/uninstall/Update a NDIS IM driver by a Command line during developing ?

Thanks

During development, you can replace the .sys file and then disable/enable the network card, should help.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hello pals.
>
> How can I install/uninstall/Update a NDIS IM driver by a Command line during developing ?
>
> Thanks
>

thanks
Do you know the Command of Enable/Disable a network connection or a service on a local connection ?

Take a look at the BindView sample application in the WDK. You can extract
the code you need to install/uninstall an IM driver from there.

Good luck,

Thomas F. Divine


From:
Sent: Tuesday, December 29, 2009 6:59 AM
To: “Windows System Software Devs Interest List”
Subject: RE:[ntdev] How to install/uninstall/Update a NDIS IM driver by a
Command line

> thanks
> Do you know the Command of Enable/Disable a network connection or a
> service on a local connection ?
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

> Do you know the Command of Enable/Disable a network connection

  1. GUI via Network And Sharing Center
  2. Device Manager - disable the network adapter (these 2 ways are the same internally)
  3. try “netsh”


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Disabling the bound NIC devices does not stop and unload an IM driver. The
loading of the IM driver is triggered by the existing of the IM Virtual
Adapter devices. These are created in response to the provisioned bindings
(not the active bindings).

To remove an IM driver from memory during development, you simply unbind it
from all adapters. That causes the NetService ‘class’ installer to delete
the IM Virtual Adapters. When the last binding is removed and thus the last
Virtual Adapter devnode is removed, PnP unloads the driver.

BindView is the only tool provided in the WDK (as a sample) that shows how
to manipulate bindings. If you go hunting down old DDKs you can find the
SNETCFG sample (the sample name is NETCFG, the executable built is SNETCFG)
which was a command line tool. I think also that a similar tool has been
published as PROTINST or some such - check www.ndis.com.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, December 29, 2009 7:00 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to install/uninstall/Update a NDIS IM driver by a
Command line

thanks
Do you know the Command of Enable/Disable a network connection or a service
on a local connection ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

“net stop ”

Gary G. Little
Sent via HTC Diamond on Sprint.

-----Original Message-----
From: xxxxx@gmail.com
Sent: Tuesday, 29 December, 2009 05:59 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to install/uninstall/Update a NDIS IM driver by a Command line

thanks
Do you know the Command of Enable/Disable a network connection or a service on a local connection ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Nope. NDIS IM Drivers are PnP drivers not legacy drivers (like, for
instance, an NDIS Protocol might be).

PnP manages the lifetime (load lifetime) of the driver. Only by making all
of the DevNodes stop (or in the case of IM drivers, get deleted) can you get
PnP to delete the FDOs, allow the driver reference count to drain, and
unload the driver.

IIRC, net stop that is running will just hang and eventually
timeout in the SCM. Maybe now it gives an error. I guess I could try it to
find out…

Cheers,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Tuesday, December 29, 2009 11:11 AM
To: Windows System Software Devs Interest List
Subject: RE: RE:[ntdev] How to install/uninstall/Update a NDIS IM driver by
a Command line

“net stop ”

Gary G. Little
Sent via HTC Diamond on Sprint.

-----Original Message-----
From: xxxxx@gmail.com
Sent: Tuesday, 29 December, 2009 05:59 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to install/uninstall/Update a NDIS IM driver by a
Command line

thanks
Do you know the Command of Enable/Disable a network connection or a service
on a local connection ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer