Free for PREMIUM members
Go Premium for a chance to win a PS4. Enter to Win
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
:: BATCH SCRIPT START
IF NOT EXIST "%InputFile%" ECHO "%InputFile%" file does not exist. &GOTO :EndScript
FOR %%R IN ("%InputFile%") DO IF %%~zR EQU 0 ECHO "%InputFile%" file is empty. &GOTO :EndScript
IF EXIST "%OutputFile%" DEL /F /Q "%OutputFile%"
FOR /F %%c IN ('TYPE "%InputFile%"') DO (
ECHO Processing: %%c
PING -n 1 -w 1000 %%c|Find /I "TTL" >NUL
IF NOT ERRORLEVEL 1 (
SC \\%%c STOP "srservice" >>%OutputFile%
SC \\%%c config "srservice" start= disabled >>%OutputFile%
)ELSE (ECHO Unable to connect %%c: system may be offline.))
ECHO. &ECHO Script complete. Check "%OutputFile%" file.
EXIT /B 0
:: BATCH SCRIPT END
Open in new window
Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.