Article ID: 197424 - Last Review: August 8, 2007 - Revision: 3.4 How To Enable DHCP Automatically Using WSH VBScriptThis article was previously published under Q197424
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key"
Help topic in Regedt32.exe.
On This PageSUMMARY
This article describes how to create a VBScript file that automatically
enables DHCP under Windows 98 or Windows 95 using Windows Script Host.
IMPORTANT: This procedure is not intended for home users with a few computers. Please note that if you are using Windows 95, you need to install WSH.exe from the following Web site to enable Windows Script Host: http://msdn2.microsoft.com/en-us/library/ms950396.aspx
(http://msdn2.microsoft.com/en-us/library/ms950396.aspx)
MORE INFORMATION
WARNING: Modifying the registry incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect modification of the
Registry can be solved. Modify the registry at your own risk.
For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD). WARNING: The following VBScript sample provided will erase the static IP address assigned to a computer. There is no automated way to go back to static IP address after using the script provided below. There are 2 registry entries used to determine if DHCP is enabled IPAddress and IPMask. Both are set to "0.0.0.0" to enable DHCP. Use the following line to run DHCP.vbs from a login script: Sample CodeUsing a text editor, create a VBScript file called DHCP.vbs with the following lines:REFERENCES
Additional information on Windows Script Host and VBScript Language
Reference can be found on the following Web site:
http://msdn2.microsoft.com/en-us/library/ms950396.aspx
(http://msdn2.microsoft.com/en-us/library/ms950396.aspx)
APPLIES TO
| Article Translations
|

Back to the top
