WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Get IP Address

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Getting IP address from Windows 95 (and NT)

Keywords:    IP address	  subnet mask  MAC

Question:

How do you extract the subnet mask from a Windows 95 machine?

Answer:

Please note: The Ip Grabber Extender functions supercede, the example in this article.

To grab the IP address in WIN95 you can just use the (undocumented) switch:


	RunWait("winipcfg.exe", "/all /batch filename.ext") 

Then it'd be a simple matter of parsing the resultant file to get the ip address.

The following also works:

	Run("winipcfg.exe","")
	a=WinGetActive()
	a=WinIDGet(a)
	WinIconize(a)
	TimeDelay(1)
	b=WinItemNameID()
	c=ItemLocate(a,b,"|")
	x=ItemExtract(c-1,b,"|")
	WinClose(a)
	Message("ip address",x)
NOTE:
	WINIPCFG /ALL
Brings out the More Info screen.
Article ID:   W12654
Filename:   Get IP Address - WinIpCfg method..txt
File Created: 2001:01:03:14:12:44
Last Updated: 2001:01:03:14:12:44