Windows - how to control XP control panels: network setting


#1

I want to write a script to toggle my wireless and wired connections
ON/OFF.
Any pointers on how to go about doing this?

Thanks!


#2

itsme213 wrote:

I want to write a script to toggle my wireless and wired connections ON/OFF.
Any pointers on how to go about doing this?

General routine for Windows system fun:

  • Go to MSDN
  • Search around for how to do this using VBScript or JScript.
  • Port to Ruby, using Win32OLE lib for ActiveX/Win32 calls.

James

http://www.ruby-doc.org - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools


#3

You will likely need to access the Windows API - these posts may help
you:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=114198&SiteID=1
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_tasks__networking.asp

The second edition of the Pickaxe book has some info on calling the
Win32API on page 755.

The same example is on the web here:
http://www.rubycentral.com/book/lib_windows.html

Les