Скрипт на выключение windows

Материал из wiki.nntc.nnov.ru
Перейти к навигации Перейти к поиску
@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