You can create a VBS script launched from your startnet.bat to read the IP address (among other things) and store it into a variable. We use a sysinfo.cmd file to launch the sysinfo.vbs file, which in turn grabs the info and pipes it to a setenv.cmd file and runs it - both files are in x:\windows\system32.
You can use an IF statement in your startnet.cmd to compare that IP variable and act accordingly (launch a file, run a script, map a drive, etc.)
REM *** sysinfo.cmd ***
cscript.exe //nologo x:\windows\system32\sysinfo.vbs >x:\windows\system32\setenv.cmd
x:\windows\system32\setenv.cmd
REM *** sysinfo.vbs ***
dim count,t,ipchar,ip,lab,cnt
REM *** Get IP Address and Filter Link local IPv6 ***
On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\" & "." & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration", "WQL", &h10 + &h20)
For Each objItem In colItems
strIPAddress = Join(objItem.IPAddress, ",")
Next
count=1
do while(ipchar<>",")
ipchar=mid(strIPAddress,count,1)
count=count+1
if ipchar<>"," then ip=ip & ipchar
Loop
WScript.Echo "SET IP=" & ip
REM *** Determine which lab menu to load ***
REM *** LAB1 = 10.10.16.x - 10.10.31.x LAB2 = 10.10.32.x - 10.10.47.x
count=1
cnt=0
ipchar=""
lab=""
do while(ipchar<>",")
ipchar=mid(strIPAddress,count,1)
if ipchar="." then cnt=cnt+1
count=count+1
if cnt=2 and ipchar<>"." then lab=lab & ipchar
loop
if lab<32 then Wscript.Echo "SET LAB=" & "LAB1" else WScript.Echo "SET LAB=" & "LAB2"
REM *** code placed in startnet.cmd ***
set LAB=UNKNOWN
call x:\windows\system32\sysinfo.cmd
GOTO %LAB%
:LAB1
REM *** launch the HTA and pass the IP variable to be displayed on screen ***
mshta.exe "i:\wizards\lab1.hta" "%IP%"
goto END
:LAB2
REM *** launch the HTA and pass the IP variable to be displayed on screen ***
mshta.exe "i:\wizards\lab2.hta" "%IP%"
goto END
:UNKNOWN
x:\Programs\nu2menu\nu2menu.exe
:END
We just completed a setup that does this very thing. If the third octet of the IP is <32, it launches the hta for one lab, and if it's >=32, it launches the hta for another lab. If it's neither, or an error occurs, a 'default' nu2menu is loaded.
Our setup is fairly deep and uses PXE rather than off the CD, but the basic steps should still apply. Hope this helps.