Solved

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

Posted on 2004-08-26
7
175 Views
Last Modified: 2010-05-02
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!
0
Comment
Question by:preddibear
  • 3
7 Comments
 
LVL 3

Expert Comment

by:nichia
ID: 11905005
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!
0
 
LVL 3

Expert Comment

by:nichia
ID: 11943688
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
-----------------------------------------------------------

0
 
LVL 3

Expert Comment

by:nichia
ID: 12071711
Hello?
0
 

Author Comment

by:preddibear
ID: 12461147
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.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12689638
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now