备份 ~cp=B>*(
-------------------------------------------------------------------------------------------------------------------------------------- yc]_ ?S>9
@echo off \9p.I?=
rem get current date and time +pT;;
9
for /f "tokens=1, 2, 3, 4 delims=-/. " %%j in ('Date /T') do set FILENAME=srv_%%j_%%k_%%l_%%m ejR$N!LL
for /f "tokens=1, 2 delims=: " %%j in ('TIME /T') do set FILENAME=%FILENAME%_%%j_%%k.bat "zNS6I?rzE
2"a%%fv
rem get all service name l]&A5tz3
sc query type= service state= all| findstr /r /C:"SERVICE_NAME:" >tmpsrv.txt *jc
>?)k
echo Save Service Start State In %FILENAME% ,2Ed^!`
rem save service start state into batch file ZGH
7_K
rem FLQke"6i0:
j}Svb1A
echo @echo Restore The Service Start State Saved At %TIME% %DATE% >"%FILENAME%" Ji,;ri2i
echo @pause >>"%FILENAME%" nT=%3_.
X4:84
for /f "tokens=2 delims=:" %%j in (tmpsrv.txt) do @( sc qc %%j |findstr START_TYPE >tmpstype.txt && for /f "tokens=4 delims=:_ " %%s in ( tmpstype.txt) do @echo sc config %%j start= %%s >>"%FILENAME%") jbe:"Stw
echo @pause >>"%FILENAME%" PO'K?hVS^w
|*J;X<Vm
del tmpsrv.txt {~51h}>b#
del tmpstype.txt <`Fl Igo
-------------------------------------------------------------------------------------------------------------------------------------- S6bYd`
<