0

How can I control the "enable/disable" network connections from the control panel through visual basic? Or what params do I pass to svchosts.exe to control this, or what is the actual service name of "Network Connections" in services.msc so I can use "NET STOP {SERVICE} | NET START {SERVICE} ? Any ideas to how I can manipulate a program to the actual network connection would be great.

:D

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by esdesign
0

Hi esdesign,

Have you tried using the "Shell" function in VB? Since you know how to use the NET command Shell might be what you need.

The call would look like

Shell ("NET START <Your parameters>", <WindowStyle>)

Hope this helps

Yomet

0

Hey, thanks for the reply. I actually figured out the service names for connecting to the internet or just the local network file sharing services.

NET STOP WORKSTATION /y <-- stops all local network services (file sharing, etc.. /y switch auto inserts y at prompts for each service being stopped)
NET START WORKSTATION

and

NET STOP DHCP
NET START DHCP

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.