Link to home
Start Free TrialLog in
Avatar of preddibear
preddibear

asked on

How to configure a network card to use DHCP server via registry in Win98 WinME

How can I configure a network card to use DHCP server via registry in Win98, WinMe?
What are the things that should be modified and to look for?
Please help!!!!

Thanks!
Avatar of nichia
nichia

Do you mean in code, or manually?

You can manually set this in XP (assuming Me/98 is similar)
Control Panel->Newwork Connections->Local Area Connection->Properties (button)->Internet Protocol TCP/IP (properties button)->Obtain an IP address automatically (option button).

Hope it helps!
This may be helpful:

---------------------------------------------------
"WMI Tasks for Scripts and Applications"

Search for enableDHCP (the example is halfway down the page)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_tasks_for_scripts_and_applications.asp

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
    ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
 
For Each objNetAdapter In colNetAdapters
    errEnable = objNetAdapter.EnableDHCP()
Next
-----------------------------------------------------------

Hello?
Avatar of preddibear

ASKER

I've already found a way...

Check the network adapter first located at
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Net\ 000x
where x would be the adapter number to be modified in
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Nettrans

set IPAddress and IPMask keys to 0.0.0.0,delete any default gateway key and reboot.
then ip renew and release and it works.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial