:: Запустить сбор.cmd
@echo off
chcp 65001 >nul
title Windows IR Collector
net session >nul 2>&1
if not "%errorlevel%"=="0" (
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
cd /d "%~dp0"
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0IRCollector.ps1"
if not "%errorlevel%"=="0" (
echo.
echo При выполнении сборщика произошла ошибка.
pause
)