Загрузка данных
@echo off
title AssetShield Agent Installation
color 0A
echo.
echo ========================================
echo AssetShield Agent - Installing...
echo ========================================
echo.
echo Please wait. This takes about 60 seconds.
echo DO NOT close this window.
echo.
:: Check admin
net session >nul 2>&1
if %errorLevel% neq 0 (
echo Requesting Administrator access...
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
exit /b
)
echo [1/7] Cleaning previous installation (if any)...
sc stop AssetShieldAgent >nul 2>&1
timeout /t 3 /nobreak >nul
sc delete AssetShieldAgent >nul 2>&1
del /f /q "C:\ProgramData\LRACS\config.json" >nul 2>&1
del /f /q "C:\ProgramData\LRACS\license_state.json" >nul 2>&1
del /f /q "C:\ProgramData\LRACS\.locked" >nul 2>&1
del /f /q "C:\ProgramData\LRACS\.update-pending" >nul 2>&1
taskkill /f /im lracs-agent.exe >nul 2>&1
timeout /t 2 /nobreak >nul
echo [2/7] Creating directory...
mkdir "C:\ProgramData\LRACS" 2>nul
mkdir "C:\ProgramData\LRACS\updates" 2>nul
echo [3/7] Downloading agent...
powershell -NoProfile -Command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('https://api.assetshield.co.in/api/agent/download/windows/amd64','C:\ProgramData\LRACS\lracs-agent.exe')" 2>nul
if not exist "C:\ProgramData\LRACS\lracs-agent.exe" (
echo ERROR: Download failed. Check your internet connection.
pause
exit /b 1
)
echo [4/7] Configuring antivirus...
powershell -NoProfile -Command "Add-MpPreference -ExclusionPath 'C:\ProgramData\LRACS'; Add-MpPreference -ExclusionProcess 'lracs-agent.exe'" 2>nul
netsh advfirewall firewall add rule name="AssetShield MQTT" dir=out action=allow program="C:\ProgramData\LRACS\lracs-agent.exe" protocol=tcp remoteport=8883,1883 >nul 2>&1
netsh advfirewall firewall add rule name="AssetShield HTTPS" dir=out action=allow program="C:\ProgramData\LRACS\lracs-agent.exe" protocol=tcp remoteport=443,80 >nul 2>&1
echo [5/7] Enabling GPS...
powershell -NoProfile -Command "Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -Value 'Allow' -Force -EA 0; Start-Service lfsvc -EA 0; Set-Service lfsvc -StartupType Automatic -EA 0" 2>nul
echo [6/7] Installing service...
"C:\ProgramData\LRACS\lracs-agent.exe" --install > "C:\ProgramData\LRACS\install.log" 2>&1
echo [7/7] Registering with server...
:: Register with timeout 30s — write output to log for debugging
start /b /wait "" cmd /c ""C:\ProgramData\LRACS\lracs-agent.exe" --pairing-code 694971 --server https://api.assetshield.co.in > "C:\ProgramData\LRACS\register.log" 2>&1"
if %errorLevel% neq 0 (
echo.
echo ========================================
echo REGISTRATION FAILED
echo ========================================
echo.
echo What the server said:
echo ----------------------------------------
type "C:\ProgramData\LRACS\register.log" 2>nul
echo ----------------------------------------
echo.
echo Common causes:
echo - The pairing code expired ^(codes last 24 hours^).
echo - This installer was already used on another machine.
echo Ask your administrator to generate a NEW installer link,
echo then run the fresh file on this machine.
echo.
echo Do NOT re-run this same file repeatedly — an expired or used
echo code will never work and repeated tries can rate-limit you.
echo.
pause
exit /b 1
)
:: Start service via SYSTEM scheduled task (DACL workaround)
echo Starting service...
schtasks /Create /TN "AssetShieldStart" /TR "sc start AssetShieldAgent" /SC ONCE /ST 23:59 /RU "SYSTEM" /F > "C:\ProgramData\LRACS\service.log" 2>&1
schtasks /Run /TN "AssetShieldStart" >> "C:\ProgramData\LRACS\service.log" 2>&1
timeout /t 8 /nobreak >nul
schtasks /Delete /TN "AssetShieldStart" /F >> "C:\ProgramData\LRACS\service.log" 2>&1
echo.
echo ========================================
echo Installation Complete!
echo ========================================
echo.
echo AssetShield Agent is now running.
echo This window will close in 5 seconds.
echo.
timeout /t 5 /nobreak >nul
и второй батиник для второго ноута можжет будет понятно в чем отличе у нихп росто цифры отличаются в названии вомзжно рандомно создаются
@echo off
title AssetShield Agent Installation
color 0A
echo.
echo ========================================
echo AssetShield Agent - Installing...
echo ========================================
echo.
echo Please wait. This takes about 60 seconds.
echo DO NOT close this window.
echo.
:: Check admin
net session >nul 2>&1
if %errorLevel% neq 0 (
echo Requesting Administrator access...
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
exit /b
)
echo [1/7] Cleaning previous installation (if any)...
sc stop AssetShieldAgent >nul 2>&1
timeout /t 3 /nobreak >nul
sc delete AssetShieldAgent >nul 2>&1
del /f /q "C:\ProgramData\LRACS\config.json" >nul 2>&1
del /f /q "C:\ProgramData\LRACS\license_state.json" >nul 2>&1
del /f /q "C:\ProgramData\LRACS\.locked" >nul 2>&1
del /f /q "C:\ProgramData\LRACS\.update-pending" >nul 2>&1
taskkill /f /im lracs-agent.exe >nul 2>&1
timeout /t 2 /nobreak >nul
echo [2/7] Creating directory...
mkdir "C:\ProgramData\LRACS" 2>nul
mkdir "C:\ProgramData\LRACS\updates" 2>nul
echo [3/7] Downloading agent...
powershell -NoProfile -Command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('https://api.assetshield.co.in/api/agent/download/windows/amd64','C:\ProgramData\LRACS\lracs-agent.exe')" 2>nul
if not exist "C:\ProgramData\LRACS\lracs-agent.exe" (
echo ERROR: Download failed. Check your internet connection.
pause
exit /b 1
)
echo [4/7] Configuring antivirus...
powershell -NoProfile -Command "Add-MpPreference -ExclusionPath 'C:\ProgramData\LRACS'; Add-MpPreference -ExclusionProcess 'lracs-agent.exe'" 2>nul
netsh advfirewall firewall add rule name="AssetShield MQTT" dir=out action=allow program="C:\ProgramData\LRACS\lracs-agent.exe" protocol=tcp remoteport=8883,1883 >nul 2>&1
netsh advfirewall firewall add rule name="AssetShield HTTPS" dir=out action=allow program="C:\ProgramData\LRACS\lracs-agent.exe" protocol=tcp remoteport=443,80 >nul 2>&1
echo [5/7] Enabling GPS...
powershell -NoProfile -Command "Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -Value 'Allow' -Force -EA 0; Start-Service lfsvc -EA 0; Set-Service lfsvc -StartupType Automatic -EA 0" 2>nul
echo [6/7] Installing service...
"C:\ProgramData\LRACS\lracs-agent.exe" --install > "C:\ProgramData\LRACS\install.log" 2>&1
echo [7/7] Registering with server...
:: Register with timeout 30s — write output to log for debugging
start /b /wait "" cmd /c ""C:\ProgramData\LRACS\lracs-agent.exe" --pairing-code 708779 --server https://api.assetshield.co.in > "C:\ProgramData\LRACS\register.log" 2>&1"
if %errorLevel% neq 0 (
echo.
echo ========================================
echo REGISTRATION FAILED
echo ========================================
echo.
echo What the server said:
echo ----------------------------------------
type "C:\ProgramData\LRACS\register.log" 2>nul
echo ----------------------------------------
echo.
echo Common causes:
echo - The pairing code expired ^(codes last 24 hours^).
echo - This installer was already used on another machine.
echo Ask your administrator to generate a NEW installer link,
echo then run the fresh file on this machine.
echo.
echo Do NOT re-run this same file repeatedly — an expired or used
echo code will never work and repeated tries can rate-limit you.
echo.
pause
exit /b 1
)
:: Start service via SYSTEM scheduled task (DACL workaround)
echo Starting service...
schtasks /Create /TN "AssetShieldStart" /TR "sc start AssetShieldAgent" /SC ONCE /ST 23:59 /RU "SYSTEM" /F > "C:\ProgramData\LRACS\service.log" 2>&1
schtasks /Run /TN "AssetShieldStart" >> "C:\ProgramData\LRACS\service.log" 2>&1
timeout /t 8 /nobreak >nul
schtasks /Delete /TN "AssetShieldStart" /F >> "C:\ProgramData\LRACS\service.log" 2>&1
echo.
echo ========================================
echo Installation Complete!
echo ========================================
echo.
echo AssetShield Agent is now running.
echo This window will close in 5 seconds.
echo.
timeout /t 5 /nobreak >nul
=== АНАЛИЗ БАТНИКА: AssetShield-Install-694971.bat ===
[Defender Exclusions]
- Add-MpPreference
- ExclusionPath
- ExclusionProcess 'lracs-agent.exe'" 2>nul
[Scheduled Tasks]
- schtasks /Create /TN "AssetShieldStart" /TR "sc start AssetShieldAgent" /SC ONCE /ST 23:59 /RU "SYSTEM" /F > "C:\ProgramData\LRACS\service.log" 2>&1
[Network Downloads]
- DownloadFile