Disabled Lan using Command prompt

I want to disabled my Xp Lan connection using a batch file or Command prompt.

I used this code:

"netsh interface set interface  name = "Local Area Connection" admin = DISABLED "

but it gives error ------------

One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct syntax.

How can i solve this?
Who is Participating?
QlemoConnect With a Mentor DeveloperCommented:
XP netsh treats LAN connections as something you cannot disable. The help clearly talks about "WAN only" (meaning no WLAN or LAN).

Using DevCon, however, requires you to know the name of the installed driver. We can now go down a complicated route to get the necessary info (in a batch file):
@echo off
for /F "tokens=2*" %%M in (
  'reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards" /s ^| find "Description" '
) do devcon find PCI\* | find "%%N" | for /F "delims=:" %%A in ('more /e') do devcon disable "%%A"

Open in new window

BAKADYConnect With a Mentor Commented:
maybe not the wisest answer, but have you look in the documentation?

dynamicweb09Author Commented:

but its not working...........please give another solution for windows xp.
Rob StoneConnect With a Mentor Commented:
Reading about it, there were issues with that command on XP.

You could try using this tool instead.

I've not used it so can't offer any more guidance on what syntax to use other than what is on the webpage.
All Courses

From novice to tech pro — start learning today.