Disconnecting Internet connection

Hello Experts,

I have a wireless connection at home (OS - Vista Home Basic). Every time I shut down my machine, I have to disconnect it (just as a good practice). Can somebody help me in writing a script that will disconnect the connection (if it is still connected) before shutdown?? How to insert that script in shutdown path???

Cheers
LVL 8
milindsmAsked:
Who is Participating?
 
amrensConnect With a Mentor Commented:
Here you go for the solution :

http://www.wlanbook.com/enable-disable-wireless-card-command-line/

Just add the command to the shutdown script after you have identified your device hardware id.
Shutdown script in Group Policy gpedit.msc > computer configurations > windows settings > scripts
0
 
x-menIT super heroCommented:
Excuse me, but, after a operating system shutdown...what is there to disconect ?
0
 
milindsmAuthor Commented:
Just a good practice. There is possibility that session remains open at ISP side. I have faced this issue in the past. I'd to then call up ISP support and had to ask them to terminate all active sessions.
0
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

 
x-menIT super heroCommented:
On the client side, if you right click the wireless addapter and chose disconnect, the session does not hang at the ISP?
0
 
milindsmAuthor Commented:
Not sure about this. But I have face such problem before. I forgot to disconnect before shutting down the OS. Next time when I logged in within say 20-30 minutes, I could not log on to network. I called up ISP support n that fellow told me that there are previous active sessions that need to be closed. He did that from his side n it worked. Not sure if it is ISPs problem..!!!
0
 
Here2HelpConnect With a Mentor Commented:
Hey.

This script assumes it's a wireless connection you want to disconnect.

Copy and Paste the code into notepad.

To find your Wireless_Connection_Name type ncpa.cpl into the vista search box.

Write down the name of your connection exactly then replace Wireless_Connection_Name in the script with your wireless connection name.

Save the code as a batch file by saving the file as Shutdown.bat

Double click Shutdown.bat to disconnect and shutdown.







::Disconnect and Shutdown the system
netsh wlan disconnect interface="Wireless_Connection_Name"
shutdown /s /p /f

Open in new window

0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.