Toggle IP From Static to DHCP to Static Tool

I've created small tool(for windows XP/Vista), writen in visual basic 6.this tool was created for switching between static LAN ip to DHCP and back to original static IP (original IP saved in temporary variable) without opening network configuration, And without typing anything, just few mouse click is what we need. This tool using Windows Management Instrumentation for enumerating all network interface, get parameters, and set parameters.

Set objwmiservice = GetObject("winmgmts:\\.\root\cimv2")
Set colNIC_Config = objwmiservice.ExecQuery("Select * from Win32_NetworkAdapterConfiguration WHERE Index='" & _
                    Netconf.strIFIndex(CboIF.ListIndex) & "' AND IPEnabled=TRUE")
Toggle LAN, DHCP, Static IP, Wireless

 

 

I've included source code, so you can freely modify and use it according to your needs. No additinal components's needed here just basic Microsoft Scripting Runtime , Microsoft Shell Control And automation.

Visual basic, VB6, References, Microsoft Scripting Runtime, Microsoft Shell Controls And automation

i've just test it on my desktop and my friend's notebook, i don't know if there's any bug or malfunction on other system.

 

here's the source code ToggleLAN.zip (135)

 

enjoy :)

Related posts:

Tags: , , , , , ,

Incoming search terms for the article:

set ip to dhcp vb6 (3), mysql stati ip vb net (2), dhcp tools (2), toggle static dhcp (2), vista dhcp and static (2), bash change dhcp to static centos (2), toggle dhcp in vista (1), xp wifi fixed ip to dhcp (1), toggle dhcp (1), toggle between ststic address and dhcp (1), toggle between dhcp and static xp (1), toggle between 2 ips (1), toggle tool (1), togle dhcp on linux (1), toogle lan programm (1)

4 Responses to “Toggle IP From Static to DHCP to Static Tool”

  1. gen says:

    i trying write in VB .Net, and still not found the code.
    do you have this application code in VB.NET?
    thanks.

    • admin says:

      no, i don’t have the code for VB .net, but if you notice the code i wrote in VB is just interfacing to microsoft scripting runtime.

  2. Visitor911 says:

    you left out the module -.-

    • admin says:

      whooppss, sorry it’s been a long time since i wrote this atricle and prog, i’ve never realized i’ve missed the module :D i’ll upload the module soon

Leave a Reply