j-p Posted February 8, 2006 Share Posted February 8, 2006 Hi, I would like to activate and deactivate my lan connection. is that somehow possible? Thank You j-p Link to comment Share on other sites More sharing options...
seandisanti Posted February 8, 2006 Share Posted February 8, 2006 Hi,I would like to activate and deactivate my lan connection. is that somehow possible?Thank Youj-pcheck out netsh, you may be able to do what you want with that. i have a script at home that toggles dhcp or static ip settings for when i'm on my own network. Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 8, 2006 Share Posted February 8, 2006 check out netsh, you may be able to do what you want with that. i have a script at home that toggles dhcp or static ip settings for when i'm on my own network.Hi,maybe you should download devcon.exe.But I´ll try to lookup the netsh command, too. So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 8, 2006 Share Posted February 8, 2006 Hi,maybe you should download devcon.exe.But I´ll try to lookup the netsh command, too. So long,Meganetsh isn´t able to disable a network card "connection". So long,MegaP.S.: So, devcon.exe rules I think. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ACalcutt Posted February 8, 2006 Share Posted February 8, 2006 (edited) i did a quick google search and i found this for netsh " netsh interface set interface "Wireless Network Connection" Disable To enable the device substitute Disable with Enable." http://www.computing.net/windows2003/wwwbo...forum/4094.html so something like this should work $netconnection = Wireless Network Connection _rundos('netsh interface set interface "' & $netconnection &'" Disable') or $netconnection = Wireless Network Connection RunWait( @Comspec & ' /c netsh interface set interface "' & $netconnection &'" Disable') the connection names are located in the registry in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}...in each sub folder theirs a folder called connections...and thets a string called name.... ex....my wareless card name is HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{82993084-E302-4041-9CE7-DB503E8062C5}\Connection Name="Wireless Network Connection" edit...i tried that command...but it didn't seem to work edit2...i am getting a syntax error...but it does apear to do what you need C:\Documents and Settings\Administrator>netsh interface set interface "Wireless Network Connection" DISABLED One or more essential parameters not specified The syntax supplied for this command is not valid. Check help for the correct sy ntax. Usage set interface [name = ]IfName [ [admin = ] ENABLED|DISABLED [connect = ] CONNECTED|DISCONNECTED [newname = ] NewName ] Sets interface parameters. IfName - the name of the interface admin - whether the interface should be enabled (non-LAN only). connect - whether to connect the interface (non-LAN only). newname - new name for the interface (LAN only). Notes: - At least one option other than the name must be specified. - If connect = CONNECTED is specified, then the interface is automatically enabled even if the admin = DISABLED option is specified. Edited February 8, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 8, 2006 Share Posted February 8, 2006 Hi, did you test it? I think, netsh can only disable WAN-connections. Would be nice, if I am wrong. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
ACalcutt Posted February 8, 2006 Share Posted February 8, 2006 did you test it? I think, netsh can only disable WAN-connections.i think you are correct...it says that in the syntax " (non-LAN only)."...if i find anything else i will let you know Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
herewasplato Posted February 8, 2006 Share Posted February 8, 2006 This thread claims to have solved this issue:http://www.autoitscript.com/forum/index.php?showtopic=21229 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now