cls
:start
net start dhcp
%errorlevel%
goto start
Hate to leave it running tho. Need to figure out how to detect that dhcp is running. Go ahead and try this one tho just to see if it will work. You can call it "test.bat" and put it on your desktop. To stop it just hit Ctrl + C then Y. When I run it on my Win 7 it tells me the errorlevel is 2. I would think you would get a 0 when it finally works for the first time then a 2 after that. The question is do you get a 1 or some other number when it fails to start.