Solved

Disabled Lan using Command prompt

Posted on 2013-06-12
4
401 Views
Last Modified: 2013-07-16
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?
0
Comment
Question by:dynamicweb09
4 Comments
 
LVL 4

Assisted Solution

by:BAKADY
BAKADY earned 167 total points
ID: 39243648
maybe not the wisest answer, but have you look in the documentation?

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh.mspx?mfr=true
0
 
LVL 1

Author Comment

by:dynamicweb09
ID: 39243765
Thanks BAKADY

but its not working...........please give another solution for windows xp.
0
 
LVL 15

Assisted Solution

by:Rob Stone
Rob Stone earned 166 total points
ID: 39245909
Reading about it, there were issues with that command on XP.

You could try using this tool instead.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272

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

Accepted Solution

by:
Qlemo earned 167 total points
ID: 39275381
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

0

Featured Post

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now