1

I have created 10 loopback adaptors on Windows 7 using devcon

devcon -r install %WINDIR%\Inf\Netloop.inf *MSLOOP

I put this in for loop and every thing is ok but now I want to delete them using batch script? How to do that? I found that I can disable them ,but I want to delete them constantly, not just to disable them. If there some way to use devcon again?

Device Console Help:
devcon [-r] [-m:\\<machine>] <command> [<arg>...]
-r           Reboots the system only when a restart or reboot is required.
<machine>    Specifies a remote computer.
<command>    Specifies a Devcon command (see command list below).
<arg>...     One or more arguments that modify a command.
For help with a specific command, type: devcon help <command>
classfilter          Add, delete, and reorder class filters.
classes              List all device setup classes.
disable              Disable devices.
driverfiles          List installed driver files for devices.
drivernodes          List driver nodes of devices.
enable               Enable devices.
find                 Find devices.
findall              Find devices, including those that are not currently attached.
help                 Display Devcon help.
hwids                List hardware IDs of devices.
install              Install a device manually.
remove               Remove devices.

...

5
  • devcon remove ...?
    – DavidPostill
    Nov 3, 2014 at 10:51
  • remove but how to specify the adapter name,ID what to pass to this remove?
    – Xelian
    Nov 3, 2014 at 11:05
  • 1
    devcon hwids ... will list the device ids. See Device Console (DevCon.exe) Examples for lots of examples on using devcon
    – DavidPostill
    Nov 3, 2014 at 11:12
  • I just was looking this site, I try to display all loopback adapters using devcon findAll Loopbackbut nothing happens?
    – Xelian
    Nov 3, 2014 at 11:24
  • devcon status "@ROOT\NET*" ,but the name of the adaper is Microsoft Loopback Adater, not the name specified by myself, so I can't search for the adapters only to remove all.
    – Xelian
    Nov 3, 2014 at 12:11

1 Answer 1

0

To remove All Loopback adaptors

devcon /r remove =net "@ROOT\NET\*"

where =net is a class

@ROOT\NET\* is wildcard for all IDs of the adapters.

To show the name of the adapters write:

devcon status =net "@ROOT\NET\*"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .