Batch script Help
Can someone assist me with this batch script. what i want to do is if the service is stop i want a echo message to print out saying starting dhcp. If the service is connected i want a message saying stopping dhcp. The script below work but not with the messages; i think i need to put it in a loop or something but im not good with scripting i found this sample on the net.
sc query dhcp| findstr /i running | if "%errorlevel%"=="0" (sc stop dhcp) else (sc start dhcp)
The price of anything is the amount of life you exchange for it.
Henry David Thoreau