Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
IP as variable (Win98 and up)
Name: Rebel Date: August 13, 2003 at 07:25:52 Pacific OS: 98, 2K, and XP CPU/Ram: Pentium
Comment:
I would like to set my ip address as a variable and parse out the first 3 digits ex. if my ip address is 10.1.7.38, I only want to look at 10.1. Based on this, I can determine the pc's location in our subnet. I've found a way to do this in 2K and XP but the same batch file does not work in 98. Here's the batch file: > FOR /F "TOKENS=2* DELIMS=:" %%A IN ('IPCONFIG /ALL ^| FIND "IP Address"') DO FOR %%B IN (%%A) DO SET FULLIPADDR=%%B SET IPADDR=%FULLIPADDR:~0,4% IF '%IPADDR%'=='10.1' GOTO WC IF '%IPADDR%'=='10.2' GOTO Troy > Does anyone have an idea on how to get this result in Windows 98, 2K and XP?
Summary: 1. Getting your IP range - Getting information about your ip range is not difficult, I recomend using Neo Trace on your own ip. But for our test just look at your ip address, say it's 24.193.110.13 yo...