Jump to content

Recommended Posts

Posted

Hey,

problem:

Need to disable internet/lan unattended.

could be done by the networkconnectionsfolder or by device manager and then network adapters?

greetz


Posted
Hey,

problem:

Need to disable internet/lan unattended.

could be done by the networkconnectionsfolder or by device manager and then network adapters?

greetz

You got to use an utility called "devcon"

syntax should be something like that:

devcon disable =net pci\ven_10b7^&DEV_6056^&SUBSYS_635610B7^&REV_20

Of course you have to get the specify string for your NIC. You can find it in the properties in the device manager.

Hope this help!

Posted

thnx a lot :) i will check it out later this day,

i thing left, it is for more than one pc, so i don;t now all the NIC's, is there a way to read them from regedit?

Posted

hey

now i have

devcon disable =net

(all network adapter will be disabled )

but is there a way that its exclude one?

greetzz

Posted (edited)

getting closer :D

setlocal ENABLEEXTENSIONS & set "cmd=devcon listclass net^|find "NET""

for /f "Tokens=1,2* delims=:" %%a in ('%CMD%') do devcon disable @%%a

now it needs to skip adapter "ROOT\NET\0000" and enable all other network adapters

anybody ideas??? :}

EDIT: job done:

setlocal ENABLEEXTENSIONS & set "cmd=devcon listclass net"

for /f "eol=R Tokens=1* delims=:" %%a in ('%CMD%') do devcon disable @%%a

Edited by 5128

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...