Here's a script I call at the end of startnet.cmd. The goal here is to connect to \\MYSERVER\MYSHARE and run a menu script stored there. If the script can't be found I release and renew my IP address and try again.
echo Logging on to %INSTALL_SHARE% on %INSTALL_SERVER%
echo as %INSTALL_ACCOUNT_DOMAIN%\%INSTALL_ACCOUNT%...
Here's a ping to provoke name resolution,
ping 0.0.0.1 -n 3 -w 1000 > NUL
ping %INSTALL_SERVER% > NUL
Here's the logon attempt from WinPE to the server,
net use \\%INSTALL_SERVER%\%INSTALL_SHARE% /user:%INSTALL_ACCOUNT_DOMAIN%\%INSTALL_ACCOUNT% %INSTALL_PASSWORD%
if exist %START_SCRIPT% call %START_SCRIPT%
If I can't see the menu script, then I release and renew and try again,
if not exist %START_SCRIPT% (