work-tracing/fix_task.cmd
ilia-gurielidze-autstand 9e6d0a6911 first commit
2025-05-05 12:12:46 +04:00

22 lines
653 B
Batchfile

@echo off
echo Fixing the UserActivityTracking task...
REM Delete existing task if it exists
schtasks /Delete /TN "UserActivityTracking" /F
REM Create new task with better parameters
schtasks /Create /TN "UserActivityTracking" /TR "wscript.exe \"C:\Users\test.user2\Tracking\run_hidden.vbs\"" /SC ONLOGON /RU "INTERACTIVE" /F /RL HIGHEST
REM Check if task was created successfully
schtasks /Query /TN "UserActivityTracking" >nul 2>&1
if %ERRORLEVEL% EQU 0 (
echo Task created successfully.
) else (
echo Failed to create task.
)
echo.
echo After logging out and back in, check the log at:
echo %TEMP%\user_tracking_launcher.log
echo.
pause