[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

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???

2 Solutions
Here you go for the solution :


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
x-menIT super heroCommented:
Excuse me, but, after a operating system shutdown...what is there to disconect ?
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.
New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

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?
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..!!!

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

QlemoC++ DeveloperCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now