Скрипт на выключение windows: различия между версиями
Перейти к навигации
Перейти к поиску
Satushev (обсуждение | вклад) (Новая страница: «@dir "C:\Documents and Settings\" /A:D /B > C:\WINDOWS\Temp\deletor1.tmp @findstr /i /v "NetworkService" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.t…») |
Satushev (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | <pre> | ||
@dir "C:\Documents and Settings\" /A:D /B > C:\WINDOWS\Temp\deletor1.tmp | @dir "C:\Documents and Settings\" /A:D /B > C:\WINDOWS\Temp\deletor1.tmp | ||
@findstr /i /v "NetworkService" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.tmp | @findstr /i /v "NetworkService" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.tmp | ||
Строка 10: | Строка 11: | ||
@for /F "tokens=1 delims=" %%i in (C:\WINDOWS\Temp\deletor2.tmp) do net user %%i /delete | @for /F "tokens=1 delims=" %%i in (C:\WINDOWS\Temp\deletor2.tmp) do net user %%i /delete | ||
@del C:\WINDOWS\Temp\deletor1.tmp C:\WINDOWS\Temp\deletor2.tmp | @del C:\WINDOWS\Temp\deletor1.tmp C:\WINDOWS\Temp\deletor2.tmp | ||
+ | </pre> |
Текущая версия на 12:45, 1 сентября 2014
@dir "C:\Documents and Settings\" /A:D /B > C:\WINDOWS\Temp\deletor1.tmp @findstr /i /v "NetworkService" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.tmp @findstr /i /v "Default User" C:\WINDOWS\Temp\deletor2.tmp > C:\WINDOWS\Temp\deletor1.tmp @findstr /i /v "%username%" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.tmp @findstr /i /v "LocalService" C:\WINDOWS\Temp\deletor2.tmp > C:\WINDOWS\Temp\deletor1.tmp @findstr /i /v "All Users" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.tmp @findstr /i /v "administrator" C:\WINDOWS\Temp\deletor2.tmp > C:\WINDOWS\Temp\deletor1.tmp @findstr /i /v "Ђ¤¬ЁЁбва в®а" C:\WINDOWS\Temp\deletor1.tmp > C:\WINDOWS\Temp\deletor2.tmp @for /F "tokens=1 delims=" %%i in (C:\WINDOWS\Temp\deletor2.tmp) do @RD "C:\Documents and Settings\%%i" /S/Q @for /F "tokens=1 delims=" %%i in (C:\WINDOWS\Temp\deletor2.tmp) do net user %%i /delete @del C:\WINDOWS\Temp\deletor1.tmp C:\WINDOWS\Temp\deletor2.tmp