?
Solved

Disabled Lan using Command prompt

Posted on 2013-06-12
4
Medium Priority
?
414 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Assisted Solution

by:BAKADY
BAKADY earned 501 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 498 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 71

Accepted Solution

by:
Qlemo earned 501 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

719 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