khurram 0 Posted October 19, 2004 Hello Everyone, I want to disable and enable the wired connection (ethernet adapter) in my laptop though command prompt. I am trying to use PEAP using windows XP 802.1x client for user authentication and in some cases, the user will like to enter a different username and password. The 802.1x client in windows prompts for the username and password only when you take out the cable or disable and enable the ethernet connection. So if anyone can tell me how can i disable and enable a specific interface in windows xp using the command line interface, I will be greatful. Regards Khurram Share this post Link to post
clutch 1 Posted October 19, 2004 Check out Quote: netsh /? and Quote: netsh interface /? Share this post Link to post
khurram 0 Posted October 19, 2004 Hi, I tried netsh and netsh interface but I could not find any command in that which disables or enables a specific interface. Mostly the commands are to set the parameters for an interface. Share this post Link to post
clutch 1 Posted October 19, 2004 And if you drill down further in the help in "set", you will notice some more commands. Eventually, you would come up with something like: Quote: netsh interface set interface name="Local Area Connection" admin=ENABLED Share this post Link to post
khurram 0 Posted October 20, 2004 Hi clutch Thanks for your reply. I tried this command netsh interface set interface name="Local Area Connection" admin=ENABLED But I get the following message One or more essential parameters not specified The syntax supplied for this command is not valid. Check help for correct syntax. But if I try the following command, it works and the name of the interface is changed, netsh interface set interface name="Local Area Connection" newname=LAN1 There is one more thing that it says in the help, admin - whether the interface should be enabled <non-LAN only>. But for newname it says, newname - new name for the interface <LAN only> I wonder does it mean that I can disable or enable only the logical interfaces and not the physical ones and can change the name for physical ones (as it worked for me) Thanks again for your help and time. I highly appreciate this. Khurram [Edited by khurram on 2004-10-20 06:05:37] Share this post Link to post
clutch 1 Posted October 20, 2004 http://www.winnetmag.com/Windows/Article/ArticleID/41111/41111.html Scroll down to a response from yhamade referencing a tool named DevCon. This might do what you are looking for (for others interested, the command works fine with Windows Server 2003, and the version of netsh in XP may not support disabling in this fashion yet). Share this post Link to post
khurram 0 Posted October 20, 2004 thanks alot for replying again clutch. actually i want to make things easier for the end user .. and in case of devcon, they have to install a tool and then u can run the batch file containing commands to disbale or enable the lan .. i wonder if there is any other way in windows XP and 2000 that user is prompted by 802.1x client to login the username and password useing PEAP ... i could trigger that login only when I take out the cable from LAN or when I disable it and then enable it again .. regards khurram Share this post Link to post
ratneshyadav 0 Posted June 1, 2006 Enabling: netsh interface set interface "Local Area Connection " ENABLE Disabling: netsh interface set interface "Local Area Connection " DISABLE Ratnesh Share this post Link to post