Automatic internet connection when you start your pc

In general, after turning on the computer, to surf the internet you must first connect to the network and the provider for which you pay for the subscription.
Some internet connection services such as Fastweb always keep the computer connected in LAN and there is no need to activate anything.
Others use dial up connections with modems, ADSL connections, or access in vpn via PPPOE ; in any case, you must enter your username and password before logging in with, in some cases, the number to dial.
Even memorizing the login name and password, you must still click on the connection icon on the desktop and press the "connect" button.
My goal then is to find a way to access the internet immediately, automatically, after turning on the computer, without having to do it manually and without pressing any button.
There are two ways to enable automatic internet connection on Windows, without downloading any additional programs.
1) The first method is to create a batch script, save it in a .bat file that must be inserted in the scheduled operations .
The dos command to start a remote connection is rasdial.exe .
Then create a new text document (by right clicking with the mouse on the desktop) and write a line like this on it:
rasdial.exe "login_name" username username password
If the password has characters like & or the pipe | we must put the character in front of us ^.
For example, if the password was pom | hey then you have to write pom ^ | hey.
Be very careful to write the exact case-sensitive parameters.
This file should be saved with the name " connessionelan.bat ".
Now open the scheduled operations from the control panel, right click on the blank, choose new scheduled operation and give a recognizable name.
On this new operation, press the right mouse button and choose the properties with which to set the file to start ( connessionelan.bat ) and schedule the operation at system startup .
Restarting the pc, the computer should connect to the internet automatically, when Windows starts.
This option is not exactly maximum security because the password is not encrypted but perfectly visible in the .bat file.
2) The second method is decidedly simpler.
Going to network connections from the control panel, you should see the connection used to access the internet.
What interests us is not the LAN but the remote connection or the virtual private network (vpn), the one, so to speak, which contains the login name and password.
Then right-click on the corresponding icon, go to the properties and, in the options tab, remove the flag from the item request name, password and certificates .
Now, right click on the connection icon and click on create connection.
On the desktop you will now see the connection icon which must instead be moved to the " Startup " folder in the Start menu.
The next time the computer is started and forever, the PC will connect to the internet automatically, every time it is turned on, without making any request.
To disconnect the PC from the Internet with a click from the desktop, instead just create a .bat file (as seen before) with the command written inside
rasdial.exe / disconnect .
By pressing on the disconnect.bat file from the desktop, any active remote connection is terminated.
Let me know if there are problems, in general both methods work but, sometimes, the password may not be recognized correctly and the connection is refused without apparent explanations.
I remember that in the previous post it was written how to log on to Windows automatically, without having to type username and password, with autologon.
All this becomes very useful in case you want to connect to a computer remotely, from another place, waking up your PC from hibernation in an automated way and using it with programs like Logmein or Teamviewer.

Leave Your Comment

Please enter your comment!
Please enter your name here