This script is used by HLBB DLP agent deployment via SCCM.
The process of using the script is:
1. Deploy the script along with DLP agent packages via SCCM
2. script will check if you have DLP agent install, if not jump to 5. If yes, proceed installation and end.
3. script will check if your system is using 32bit or 64bit
4. script will check your DLP agent version, if matched. proceed uninstall.
5. Deploy the script along with DLP agent packages via SCCM again
6. Proceed installation and end
------------------------------------------------------------------------------------------------------------------------------------------------
@echo off
setlocal enabledelayedexpansion
set dlpagentver=15.5.0.17018
for /f "usebackq skip=1 tokens=*" %%i in (`wmic OS get OSArchitecture ^| findstr /r /v "^$"`) do (
set "_bits=%%i"
set "_bits=!_bits: =!"
)
If "%_bits%" EQU "64-bit" (
set arch=64bit
) else (
set arch=32bit
)
IF EXIST "%PROGRAMFILES%\Manufacturer\Endpoint Agent\edpa.exe" ( set existornot=yes ) ELSE ( set existornot=no )
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{12F26F08-FE80-44EF-91BB-06CD0F5E1B16} /v DisplayVersion > nul
if %existornot% == yes ( if %ERRORLEVEL% EQU 0 ( echo exit ) ) else ( if %arch%==32bit ( start /d agentinstaller32 install_agent.bat & set existornot=yes ) else ( start /d agentinstaller32 install_agent.bat & set existornot=yes ) )
------------------------------------------------------------------------------------------------------------------------------