Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    3 Star Lounger Not Brightest Bulb's Avatar
    Join Date
    Dec 2009
    Location
    Central IL
    Posts
    376
    Thanks
    69
    Thanked 4 Times in 4 Posts

    Disable Internet

    Ok with XP I could enable/disable internet connection just from the system tray. Windows 7 does not have this feature is there anything quicker than opening network and sharing center then to local area connection and disabling it from there. I really don't like leaving connection open all the time but surely there's got to be an easier/shortcut way.

  2. #2
    Lounge VIP
    Join Date
    Apr 2011
    Location
    Scotland
    Posts
    1,168
    Thanks
    44
    Thanked 134 Times in 115 Posts
    This article and video in ITCookbook should do the trick.

    Call the command from a shortcut to a batch file on your desktop. Make sure to run as admin etc. Make a second batch file to enable the adapter again.

    Disclaimer: I've not tried it!

    /Edit: cancel that disclaimer - it worked perfectly on Win7 Home Premium x64.
    Last edited by Tinto Tech; 2011-06-20 at 11:24. Reason: update after testing

  3. #3
    3 Star Lounger Not Brightest Bulb's Avatar
    Join Date
    Dec 2009
    Location
    Central IL
    Posts
    376
    Thanks
    69
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Tinto Tech View Post
    This article and video in ITCookbook should do the trick.

    Call the command from a shortcut to a batch file on your desktop. Make sure to run as admin etc. Make a second batch file to enable the adapter again.

    Disclaimer: I've not tried it!

    /Edit: cancel that disclaimer - it worked perfectly on Win7 Home Premium x64.
    If I had a clue what the above meant and how to do it, I would not use the name "not the brightest bulb"

  4. #4
    Lounge VIP
    Join Date
    Apr 2011
    Location
    Scotland
    Posts
    1,168
    Thanks
    44
    Thanked 134 Times in 115 Posts
    OK, let's see if we can't walk you through it.

    • Click Start. Enter "CMD" (without the quotes) in the Search Program and Files box

    • Right Click on the CMD prompt that appears at the top of the menu and select Run As Administrator

    • In the command window that opens enter the following code: "wmic nic get name, index" Without the quotes

    • Take a note of the index number of your network port.

    • Now Open Notepad (Start>Accessoroes>Notepad) and enter the text "wmic path win32_networkadapter where index=XX call disable" Without the quotes. Where XX is the index number you just noted.

    • Save this file on your desktop as a file called Internet off.bat

    • Create a copy of that file and edit it to contain the text "wmic path win32_networkadapter where index=XX call enable" Without the quotes. Where XX is the index number you noted earlier.

    • Save this copy of the file on your desktop called Internet on.bat


    Test the files: Double click on Internet off and you should go offline (Print out these instructions first!). Double click the Internet on file and you should come back online in a few seconds.

  5. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Actually you can do it directly from Win 7 although it is not intuitively obvious.
    To Disconnect:
    1. Click on the Network Icon in the Notification Area.
    2. Click on Open Network and Sharing Center
    3. Click on Local Area Connection.
    4. In the popup click on Disable.

    To Reconnect:
    Repeat 1 & 2 above
    3. Click on Change adapter settings in left panel.
    4. Right-Click on your wired LAN adapter.
    5. Click on Enable.
    Last edited by RetiredGeek; 2011-06-20 at 20:11.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. #6
    3 Star Lounger Not Brightest Bulb's Avatar
    Join Date
    Dec 2009
    Location
    Central IL
    Posts
    376
    Thanks
    69
    Thanked 4 Times in 4 Posts
    Yes I can do that as I mentioned on 1st reply but it would be a bunch easier to just have a desktop shortcut.

    TT, Question where is my index number of port located at. If these questions get too stupid I will understand lack of reply

  7. #7
    Lounge VIP bobprimak's Avatar
    Join Date
    Feb 2009
    Location
    Hinsdale, IL, USA
    Posts
    2,482
    Thanks
    176
    Thanked 152 Times in 129 Posts
    I am surprised that a computer with Windows 7 installed in it does not have a Tray Icon for the Internet Radio (hardware disconnect). Are you sure the Icon is not just Hidden? Click on an empty area of the Tray and click on Customize Notification Icons. Then scroll down to the "Available Networks" item, if it exists, and change its status to "always show". Also, most computers have special keys or function combinations on the keyboard which will toggle Internet Radio on or off. The exact configuration depends on the manufacturer, so there are no general instructions. I use either the keyboard or the Tray Icon on my Toshiba Satellite to control Wireless Internet Connections. I do not like leaving the connection available when it is not in use, much like yourself. Too much of a playground for hackers, eh?
    -- Bob Primak --

  8. #8
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Temple, Texas, USA
    Posts
    141
    Thanks
    7
    Thanked 4 Times in 4 Posts
    I just pull the plug from my cable modem.

  9. #9
    Lounge VIP bobprimak's Avatar
    Join Date
    Feb 2009
    Location
    Hinsdale, IL, USA
    Posts
    2,482
    Thanks
    176
    Thanked 152 Times in 129 Posts
    Quote Originally Posted by cws View Post
    I just pull the plug from my cable modem.
    That is, the connection between your Modem and the computer. You seem to be referring to a wired connection. The OP and I were referring to a Wireless Internet Connection using a Router. Very different -- No plug to pull here!
    -- Bob Primak --

  10. #10
    Lounge VIP
    Join Date
    Apr 2011
    Location
    Scotland
    Posts
    1,168
    Thanks
    44
    Thanked 134 Times in 115 Posts
    Quote Originally Posted by Not Brightest Bulb View Post
    TT, Question where is my index number of port located at. If these questions get too stupid I will understand lack of reply
    Sorry, been sleeping this side of the pond.

    Can you post a copy of the output of the command window? The one where you entered "wmic nic get name, index". We can verify the index number of your port from that output.

    You can then make the batch files as described using the index number.

  11. #11
    Plutonium Lounger Medico's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    12,631
    Thanks
    161
    Thanked 936 Times in 856 Posts
    My laptop has a switch on the front that disables the bluetooth and disconnects from the internet. After I download big updates, I throw the switch, shut down all security apps, then run the update.
    BACKUP...BACKUP...BACKUP
    Have a Great Day! Ted


    Sony Vaio Laptop, 2.53 GHz Duo Core Intel CPU, 8 GB RAM, 320 GB HD
    Win 8 Pro (64 Bit), IE 10 (64 Bit)


    Complete PC Specs: By Speccy

  12. #12
    3 Star Lounger Not Brightest Bulb's Avatar
    Join Date
    Dec 2009
    Location
    Central IL
    Posts
    376
    Thanks
    69
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Tinto Tech View Post
    OK, let's see if we can't walk you through it.


    • Click Start. Enter "CMD" (without the quotes) in the Search Program and Files box



    • Right Click on the CMD prompt that appears at the top of the menu and select Run As Administrator



    • In the command window that opens enter the following code: "wmic nic get name, index" Without the quotes



    • Take a note of the index number of your network port.



    • Now Open Notepad (Start>Accessoroes>Notepad) and enter the text "wmic path win32_networkadapter where index=XX call disable" Without the quotes. Where XX is the index number you just noted.



    • Save this file on your desktop as a file called Internet off.bat



    • Create a copy of that file and edit it to contain the text "wmic path win32_networkadapter where index=XX call enable" Without the quotes. Where XX is the index number you noted earlier.



    • Save this copy of the file on your desktop called Internet on.bat



    Test the files: Double click on Internet off and you should go offline (Print out these instructions first!). Double click the Internet on file and you should come back online in a few seconds.
    Below is what I get when using command line instructions above, now which one is an index port. This is what happens when I get directions it usually comes with more choices. Then I give up in frustration. Not instructors fault it’s the instructee who gets baffled. I do have Windows 7/64 bit Home Premium on main PC.

    Wan miniport (SSTP)
    Wan miniport (IKEv2)
    Wan miniport (L2TP)
    Wan miniport (PPTP)
    Wan miniport (PPPOE)
    Wan miniport (IPv6)
    Wan miniport (network monitor)
    NVIDIA nForce 10/100/1000
    Wan miniport (IP)


    I have my own WiFi tower which is hardwired to my routers in home (2 PCS) both also hardwired. 1 main and one I use as backup system (XP) Our server transmitter tower is about 8 miles from out home/tower. This is in boonies and works but probably not as functional as some.

  13. #13
    Lounge VIP
    Join Date
    Apr 2011
    Location
    Scotland
    Posts
    1,168
    Thanks
    44
    Thanked 134 Times in 115 Posts
    Quote Originally Posted by Not Brightest Bulb View Post
    Below is what I get when using command line instructions .......

    Wan miniport (SSTP)
    Wan miniport (IKEv2)
    Wan miniport (L2TP)
    Wan miniport (PPTP)
    Wan miniport (PPPOE)
    Wan miniport (IPv6)
    Wan miniport (network monitor)
    NVIDIA nForce 10/100/1000
    Wan miniport (IP)
    OK, there should be a collumn in the Cmd window to the left of these entries. That column should have the heading "Index". See image:

    wmic index.JPG

    If that is correct, the index of your network port is 7 and you can use the commands
    Code:
    wmic path win32_networkadapter where index=7 call disable
    Code:
    wmic path win32_networkadapter where index=7 call enable
    Copy the first line into Notepad and Save As "Internet Off.bat" (make sure you save it as .bat, not .txt ....see image below)

    Copy the second line into Notepad and Save As "Internet On.bat" (make sure you save it as .bat, not .txt ....see image)
    save as.JPG

    As others have observed there may be a hardware override switch on your machine, but if you want a desktop shortcut to enable and disable, this will do it for you without having to go into Network Sharing Centre as originally noted.

    Be sure to print out a copy of these comments, or have another machine that you can access the forums in case the enable command goes wrong! (Oh, and take an image backup before too, just in case!).

  14. #14
    3 Star Lounger Not Brightest Bulb's Avatar
    Join Date
    Dec 2009
    Location
    Central IL
    Posts
    376
    Thanks
    69
    Thanked 4 Times in 4 Posts
    One last question you say image backup I'm assuming a system restore. Now you tell me that I need other PC in case enable command goes wrong so I can get back to forum, HELLO "this is not brightest bulb" I think I would be better off going cliff diving in Acapulco

    # 7 port is the "NVIDIA nForce 10/100/1000 mbps ethernet"

  15. #15
    Lounge VIP
    Join Date
    Apr 2011
    Location
    Scotland
    Posts
    1,168
    Thanks
    44
    Thanked 134 Times in 115 Posts
    Quote Originally Posted by Not Brightest Bulb View Post
    One last question you say image backup I'm assuming a system restore. Now you tell me that I need other PC in case enable command goes wrong so I can get back to forum, HELLO "this is not brightest bulb" I think I would be better off going cliff diving in Acapulco

    # 7 port is the "NVIDIA nForce 10/100/1000 mbps ethernet"
    Like a lot of things, it can seem quite scary, but when it works, it just works. In any case, I would rather play with network settings than dive off a cliff, even if it was in Acapulco!

    Anyway, the port you are looking for is the Wireless, I assumed it was your Nvidia nForce, but that now appears to be the ethernet (hard wired port). So there should be a different index entry that refers to the wireless port.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •