Posted By: Sven Groot | Jan 27th, 2006 @ 5:28 AM
page 1 of 1
Comments: 10 | Views: 30855 | Downloads: 2099
Sven Groot
Sven Groot
Gravity is a CIA plot to keep us on Earth.
Download:Link for Enable/Disable Network Connection(0 Bytes)
As a followup to my post in Techoff, this is a C# port of the script that jandvries pointed me to. It is used to enable or disable a network connection in the same way the shell does it when you select the relevant option from the Network Connections folder in the Control Panel.

It is a command line application, run it without any arguments to see usage information.

If you run a localized (non-English) version of Windows, you should modify the ToggleNic.exe.config file to specify the correct names of the Network Connections folder and the enable and disable verbs.

It should work under Windows 2000 and up, although under 2000 you need to change the name of the Network Connections folder in ToggleNic.exe.config.
footballism
footballism
Another Paradigm Shift!
Wow, you are a man:p

Sheva
harumscarum
harumscarum
out of memory
This is great. I have wanted something like this for my laptop for a while now.

Thanks.
you guys can also take a look at the microsoft supported devcon tool. it might also do what you need.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272
This looks awesome, but I'm lost on configuring the verbs and configuring this to enable/disable specific adapters. Can I humbly request your patient assistance with the config file? Thanks,
I Was just wondering if someone could help me to understand where I am going wrong with this source code. I have downloaded and it runs with no errors but it does NOT disable or enable my network connections. Any help ASAP would be muchly appreciated Big Smile:D:D
Hello Sven!

First of all thanks for your efforts in this matter. I kindly request some help with the ToggleNic.exe.config file because I don't know what verbs I need for my German language version of XP.

NetworkConnectionsFolderName = Netzwerkverbindungen

So much I have found out is correct. If I spell the folder different, ToggleNIC tells me so. The same is true for the LAN connection name which I have simply renamed to "LAN" for easier troubleshooting.

So I use the following command:

ToggleNIC "LAN" disable
or
ToggleNIC "LAN" enable

By doing so the error shows up: No enable or disable verb found.

I have experimented with matching words for enable or disable in German with no success. Do I actually need translations for these two verbs? What may be wrong?

Thanks!
Hi Sven!

Thanks for your quick reply and sorry for my late one... hat too much to do the last weeks.

Now that I have looked into it again I realize how stupid I was. I didn't see that & is used to mark the shortcut letter... now it works!

Thanks a lot!

Bye
In my testing with ToggleNic, it doesn't seem to work on Vista. 

After running the ToggleNIC.exe at the command line (as admin), I get the message "Network connections folder not found".
page 1 of 1
Comments: 10 | Views: 30855 | Downloads: 2099
Microsoft Communities