Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Changing IP, gateway, etc programatically

Changing IP, gateway, etc programatically

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mutty
    wrote on last edited by
    #1

    I'm writing an application which will change the PCs IP settings (IP, gateway, DNS, etc) Any pointers on how to do this? Thanks, mutty

    M S 2 Replies Last reply
    0
    • M Mutty

      I'm writing an application which will change the PCs IP settings (IP, gateway, DNS, etc) Any pointers on how to do this? Thanks, mutty

      M Offline
      M Offline
      Magnus Westin
      wrote on last edited by
      #2

      I too have been looking in to it. And havent found any way... well except writing a kerner driver. So I use the "netsh" command. I think its available on all windows installations. You can change the IP for the current window session with the help of the IPHelper API (MSDN has examples of its use). But I guess you want to change it permanently. This is how you would write to change the IP address. netsh interface ip set address static Magnus

      1 Reply Last reply
      0
      • M Mutty

        I'm writing an application which will change the PCs IP settings (IP, gateway, DNS, etc) Any pointers on how to do this? Thanks, mutty

        S Offline
        S Offline
        S Senthil Kumar
        wrote on last edited by
        #3

        Did you try doing this with WMI[^]? Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups