pankajtakawale Posted June 5, 2007 Posted June 5, 2007 what is alternative to findstr in WinPE 2.0. findstr is unrecognized in WinPE.Once WinPE starts I want to wait untill ipaddress is being assigned to WinPE box.Following is the script I found on the net:rem if not defined Debug echo offset i=0:Loopipconfig.exe /all | findstr "Lease Obtained" > NUL & goto :Foundset /A i=%i%+1echo DHCP address not found. Wait for 10 seconds and try again. [%i%/6]sleep 10if not "%i%"=="6" goto :Loop:NotFound@echo The DHCP address was not acquired.@echo Please ensure that you have a netcard with a valid driver.netcfg -v -s apausegoto :EOF:Found@echo Found!
zorphnog Posted June 5, 2007 Posted June 5, 2007 wpeinit initializes all of your ip settings. If you just wait until it finishes then you will have an IP address. Alternatively, you could just add findstr and sleep to the system32 folder of your PE image.
p4ntb0y Posted June 5, 2007 Posted June 5, 2007 why not just call a script to ping your DHCP server.....rem @echo offREM REM This is the first Script called from Startnet.cmd stub in the WinPE REMREM Make sure that the network is fully started... Sometimes it requires a bit of time:REPEAT1ipconfigipconfigipconfigipconfigping 10.7.86.15 if errorlevel 1 GOTO REPEAT1rem @echo offREM This will just loop until you get an address.
sn3ak Posted July 4, 2007 Posted July 4, 2007 what is alternative to findstr in WinPE 2.0. findstr is unrecognized in WinPE.Once WinPE starts I want to wait untill ipaddress is being assigned to WinPE box.Following is the script I found on the net:Assuming you have a vista install already, mount the winpe wim, and copy findstr.exe from your vista install to the system32 directory in the wim.iirc findstr lives in \windows\system32.
os2fan2 Posted July 9, 2007 Posted July 9, 2007 findstr needs a NLS setting in registry. This may not exist in the default WinPE.If you plan to use WinPE as a rescue environment, then you need to set NLS settings. This is for things like compare files, etc, as well as sorting etc.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now