Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need help to keep my PC (Windows 7) connected to the net. I've found out how to get back on the Net by changing my local area connection from disable to enable. But the connection switches back to disable after I startup or reboot my PC. Does anybody know what I have to do to keep the settings enable?

share|improve this question
    
can you please provide more details? has this problem always been there? if not, when and how did it start? in the meantime, just put a batch file to enable the LAN into startup. A simple google will get you how to write that batch. –  tumchaaditya May 28 '12 at 7:46
    
Thanks tumchaaditya for your response! I’m not quite sure when the connection problem started. I’m guessing I must have stuffed something up while I tried to upgrade Adobe CS3 to CS5 (both legitimate). CS5 regNo. was accepted but not CS3 which was on my PC over 3 years. I reinstalled CS3 with quite a bit of trouble and pretty much from there on I could not connect to the internet. Creating a batch file sounds like a good idea. I searched the web for info but it all sounds a bit over my capabilities. Do you know a site with instructions that are easy to understand for a beginner? –  Skipp May 29 '12 at 5:18
    
go here: pcreview.co.uk/forums/… read the post by pegasus. he has posted a batch file. just replace the network adapter name as it appears in control panel. –  tumchaaditya May 29 '12 at 6:25

1 Answer 1

The solution involves writing a batch file to enable LAN and running it at system startup. Its not the best way. But, definitely better than having to go through reinstallations.

Step 1 - Get devcon

Download devcon.exe from here: http://download.microsoft.com/download/1/1/f/11f7dd10-272d-4cd2-896f-9ce67f3e0240/devcon.exe

Put the devcon.exe in same dir as batch file.

Step 2 - Obtain adapter name

Go to control panel > network and sharing center. Click on change adapter settings in left pane.

Locate the LAN connection with problem and note the adapter name. It is something like Broadcom NetXtreme Gigabit Ethernet

Alternatively, you can go to command prompt and use ipconfig /all

Locate the LAN connection and note the "Description" for that. The description is nothing but adapter name.

Step 3 - the batch file

Now that you have adapter name, put it in this batch file:

@echo off
goto Start

rem Use this batch file to enable or disable a device
rem from the Command Prompt.

:Start
setlocal enabledelayedexpansion
set Adapter=<PUT YOUR ADAPTER NAME HERE>

if /i "%1"=="enable" goto go
if /i "%1"=="disable" goto go
echo Syntax: Device enable / disable
goto :eof

:go
set HWID=x
set count=0
set found=no

devcon hwids "PCI\*" > device.txt
for /F "tokens=*" %%* in (device.txt) do (
set /a count=!count! + 1
if /i "%%*"=="Name: %Adapter%" set found=yes& set count=1
if !found!==yes if !count!==3 set HWID=%%*
)
if %found%==yes (
echo HWID=!HWID!
devcon %1 "!HWID!"
) else (
echo Device "%Adapter%" not found.
)
endlocal
del device.txt

Save as some abc.bat & test the batch file.

Syntax to use the batch is:

abc.bat enable

If it works, then schedule it to run at startup.

share|improve this answer
    
Problem solved. Running fine now. MANY THANKS –  Skipp May 31 '12 at 2:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.