@echo off chcp 866 echo Debug trace on utility echo Set kernel drivers debug output parameters reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter" /v DEFAULT /t REG_DWORD /d 0xffffffff /f IF errorlevel 1 GOTO :error echo. echo Set debug trace parameters reg add "HKLM\SYSTEM\CurrentControlSet\Services\sncc0\Trace" /v EnableMask /t REG_DWORD /d 0x000f /f IF errorlevel 1 GOTO :error reg add "HKLM\SYSTEM\CurrentControlSet\Services\sncc0\Trace" /v ParamsMask /t REG_DWORD /d 0xbd09 /f IF errorlevel 1 GOTO :error reg add "HKLM\SYSTEM\CurrentControlSet\Services\sncc0\Trace" /v CommonFileFlag /t REG_DWORD /d 0x0001 /f IF errorlevel 1 GOTO :error reg add "HKLM\SYSTEM\CurrentControlSet\Services\sncc0\Trace" /v DisableContextFlag /t REG_DWORD /d 0x0000 /f IF errorlevel 1 GOTO :error reg add "HKLM\SYSTEM\CurrentControlSet\Services\sncc0\Trace" /v TracePath /t REG_SZ /d "C:\Logs" /f IF errorlevel 1 GOTO :error echo. echo Create C:\Logs debug log directory IF NOT EXIST C:\Logs mkdir C:\Logs echo. rem The result of the rights installation is not checked. The error is noncritical. echo Set security on C:\Logs directory IF EXIST %SystemRoot%\System32\icacls.exe ( icacls C:\Logs /grant:r "*S-1-1-0:(OI)F" icacls C:\Logs /grant "*S-1-15-2-1:(OI)F" ) ELSE ( cacls C:\Logs /E /G Everyone:F ) echo. echo Trace is turned on, computer should be restarted echo Restart computer right now (Y/N)? set /p answer="" IF /I %answer% EQU Y shutdown /r EXIT 0 :error echo An error occured. Run command as administrator. pause EXIT 1