internet connection window


  1. Posts : 9
    Windows 7 Home Premium 64bit
       #1

    internet connection window


    Probably this is a stupid question... if so I apologize in advance.

    Previously I had an adsl modem. I also had a shortcut to set the connection (or disconnection) from the internet like the following one


    Recently I bought a new "wireless-adsl router" (D-Link DSL-2680).
    I don't know (or don't remember) how can I configure a similar window to enable/disable the internet connection of the new router on the fly through W7. At the moment the router is automatically connected to the Internet at every start-up (the router is connected to a lan port of my desktop) and the only option I see now to change its connection status is to access the router settings through the web (192.168.1.1). Anyway that's much more complicated than before, when I could use above shortcut to open the internet connection dialog to connect or disconnect on the fly.

    Probably I'm missing some W7 option to recreate the Internet connection dialog window on the new router...
    Any help?
      My Computer


  2. Posts : 14,606
    Microsoft Windows 7 Home Premium 64-bit 7600
       #2

    taken from post #4 here

    • 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.
      My Computer


  3. Posts : 9
    Windows 7 Home Premium 64bit
    Thread Starter
       #3

    boohbah said:
    taken from post #4 here

    • 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.
    Thanks

    It works! :)

    That's a good beginning... but I'm a little surprised that there isn't a specific W7 gui window to get the same result... Anyway maybe I could build one with your code...

    I'm also curious about wether is it possible to send such a command automatically to the router instead of completeley disabling the lan port which it's connected to... (in my router I can disable internet through the web settings - accessing it by the address 192.168.1.1 ). Maybe there are some telnet command that could do this... I'll investigate further with the D-Link support...

    Thanks anyway!
      My Computer


  4. Posts : 14,606
    Microsoft Windows 7 Home Premium 64-bit 7600
       #4

    glad you have it working, for the record ,its not my code , i linked the source in my first post.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:32.
Find Us