Jump to content

Easily export Windows network settings


Neutro
 Share

Recommended Posts

Hey,

I had some troubles finding this so i'm sharing it here hoping it will help some other people!

Export Windows network settings for all network adapters:

ShellExecuteWait("regedit.exe","/e network.reg HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Tcpip\Parameters\Interfaces","C:\NetworkSettings\")

This will create a file "network.reg" in the folder "C:NetworkSettings"

Import Windows network settings for all network adapters using previously exported file:

Run("Regedit /S C:\NetworkSettings\network.reg")

If the computer is running under a 64bit OS, you need to use this line before importing or it will fail:

DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)

This is really useful when you have a computer with a fixed IP that needs to go to DHCP then go back to fixed IP. Just export before DHCP, then import when going back to fixed IP :)

Tested sucessfully on Windows XP and Windows 7.

Edited by Neutro
Link to comment
Share on other sites

  • 6 months later...

Im runing win 7 on 64 bit & your your method only lets export settings, very nice, but rest does not work.

This not perfect solution i found:

ShellExecuteWait("network settings for static classroom IP.reg")
 
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...