IPSave - Save and restore your Windows IP configuration

Hugh Sparks
Version 1.3, August 30, 2006

Introduction

This set of programs lets you save your complete networking configuration to a file and restore it later by simply launching the file. Multiple adapters are correctly handled. Both static and automatic (DHCP) configurations are supported. No reboot is necessary. These features are useful to people who move their computers between networks.

This package is a replacement for the IPChange program, which had a long and venerable history but also many defects.

Saving your IP configuration

Simply run the IPSave by double-clicking on the program icon. A file, "MyIPSave.ips" will be created in the folder where you ran the program.

If you plan to save multiple IP configuarations, you will want to rename this file to something more descriptive such as "IPSaveAtHome.ips" or "IPSaveAtWork.ips", etc.

Restoring your IP configuration

Simply double-click on a previously saved .ips file.

Installing the program

Download the zip archive using the link in the next section. Unpack the archive and put the folder anywhere you like. The "Program Files" directory is traditional.

You will probably want to create shortcuts to the programs and store them on your desktop or Start Menu.

The first time you try to restore a configuration by double-clicking your .ips file, Windows will display the "Cannot open this file" window. To fix this, you need to set up a file association between .ips files and IPRestore:

Open the Command Window and execute these commands to setup the association between .ips files and the IPRestore program:

	assoc .ips=iprestore
	ftype iprestore="c:\windows\system32\wscript.exe" "c:\programs files\ipsave\iprestore.vbs" "%1"

You will need to modify the commands if your file locations are different.

Usage hints

You can restore the settings saved in an IPSave configuration file by drag-n-dropping the file on top of the IPRestore shortcut or by double clicking on the file icon.

Both IPSave and IPRestore can be used on the command line. They each take one optional filename parameter. The default filename is: MyIPSave.ips

To save a configuration:

	ipsave c:\somewhere\somefile.ips 

To restore a configuration:

	iprestore c:\somewhere\somefile.ips 

If you use IPSave frequently, you may want to create and modify a shortcut to IPSave.vbs so it stores the output file somewhere other than the installation directory. For example, I have it save the "MyIPSave.ips" file on the desktop.

To do this, create a shortcut to IPSave.vbs on your desktop. Right-click and select "Properties." Add a parameter to the Target line for the path to your MyIPSave.ips file. Use double quotes around the path if it contains spaces:

	"c:\program files\ipsave\ipsave.vbs" 
		"c:\documents and settings\yourname\desktop\MyIPSave.ips" 

In the Target box, both quoted strings shown above must be on the same line with a space between them. You will need to modify the yourname segment to reach your desktop folder.

Downloads

Download IPSave version 1.3

The source code

The programs are very simple VBScripts. You can examine and probably improve them using Notepad.

How the programs work

Recent versions of Windows have a comprehensive network configuration utility called 'netsh'. IPSave and IPRestore use netsh to save and restore the IP configuration using one-line netsh commands.

The only advantage of using IPSave and IPRestore is the ability to launch the programs via drag-n-drop or double-clicking the saved configuration files. (And not having to deal with remebering how netsh works!)

You can learn more about netsh by running it in a command window and then entering the command "help."

What's inside those mysterious configuration files?

The files contain the sequence of netsh commands needed to restore the network to the state it was in when the file was created. They are simple text files you can examine with Notepad.

A sample configuration for a static IP address
A sample configuration for an automatic (DHCP) address

Complaints and suggestions

Send me a message

Return to my home page