- 23 Oct 2025
- 3 Minutes to read
- Print
- DarkLight
- PDF
MS Intune Deployment for Windows
- Updated on 23 Oct 2025
- 3 Minutes to read
- Print
- DarkLight
- PDF
MS Intune Deployment for Windows
This article will cover the necessary steps for deploying and configuring Microsoft Intune for Windows Agents
Prerequisites
Ensure the following files are present in the location where the Intune package will be deployed.
- DVQagentInstaller64-admin-3.1.128.exe
- install-DVQ.bat
- uninstall-DVQ.bat
- IntuneWinAppUtil.exe
If files are missing, please contact support@nectarcorp.com
Batch File Code
Shell@echo off setlocal EnableExtensions REM ============================================== REM DVQ Agent - Intune silent install (sanitized) REM ============================================== REM ----- REQUIRED: your org-specific values ----- set "AGENT_ORGID=" set "AGENT_GRPID=" set "MGMT_DOMAIN_NAME=" set "MGMT_DOMAIN_PASS=" set "CONTROLLER_HOST=" REM ---------------------------------------------- REM Use hostname for agent name (reliable under SYSTEM) REM The %COMPUTERNAME% below can be changed to match what Nectar will require within the DXP. set "AGENT_NAME=%COMPUTERNAME%" set "CONTROLLER_CSV=%CONTROLLER_HOST%:40006" REM Paths set "HERE=%~dp0" REM NOTE: Change the installer filename below to the Nectar EPC installer when applicable set "SETUP=%HERE%DVQagentInstaller64-admin-3.1.128.exe" set "LOGDIR=%ProgramData%\DVQagent\InstallLogs" set "WRAPLOG=%LOGDIR%\wrapper-install.log" REM Create timestamped MSI log filename for /f "tokens=1-3 delims=/-. " %%a in ("%date%") do set "YY=%%c" & set "MM=%%a" & set "DD=%%b" set "HH=%time:~0,2%" & set "MN=%time:~3,2%" & set "SS=%time:~6,2%" set "HH=%HH: =0%" set "TS=%YY%%MM%%DD%_%HH%%MN%%SS%" set "MSI_LOG=%LOGDIR%\DVQagent_%TS%.log" if not exist "%SETUP%" ( echo ERROR: Installer not found at "%SETUP%" exit /b 2 ) if not exist "%LOGDIR%" mkdir "%LOGDIR%" >nul 2>&1 echo ==================================================>> "%WRAPLOG%" echo [%date% %time%] Starting DVQ Agent install >> "%WRAPLOG%" REM --- Sanitize values --- for /f "usebackq delims=" %%A in (` powershell -NoProfile -Command "$v='%AGENT_NAME%';$v -replace '[^A-Za-z0-9\.-]',''" `) ^ do set "SAN_AGENT_NAME=%%A" for /f "usebackq delims=" %%A in (` powershell -NoProfile -Command "$v='%AGENT_ORGID%';$v -replace '[^A-Za-z0-9\.-]',''" `) ^ do set "SAN_AGENT_ORGID=%%A" for /f "usebackq delims=" %%A in (` powershell -NoProfile -Command "$v='%AGENT_GRPID%';$v -replace '[^A-Za-z0-9\.-]',''" `) ^ do set "SAN_AGENT_GRPID=%%A" for /f "usebackq delims=" %%A in (` powershell -NoProfile -Command "$v='%MGMT_DOMAIN_NAME%';$v -replace '[^A-Za-z0-9\.-]',''" `) ^ do set "SAN_DOMAIN=%%A" for /f "usebackq delims=" %%A in (` powershell -NoProfile -Command "$v='%CONTROLLER_CSV%';$v -replace '[^A-Za-z0-9\.\-:]',''" `) ^ do set "SAN_CONTROLLER_CSV=%%A" REM Fail fast if missing values if "%SAN_AGENT_ORGID%"=="" exit /b 1639 if "%SAN_AGENT_GRPID%"=="" exit /b 1639 if "%SAN_DOMAIN%"=="" exit /b 1639 if "%SAN_CONTROLLER_CSV%"=="" exit /b 1639 REM Build MSI property block set "MSI_PROPS=AGENT_NAME=%SAN_AGENT_NAME% ^ AGENT_ORGID=%SAN_AGENT_ORGID% ^ AGENT_GRPID=%SAN_AGENT_GRPID% ^ MGMT_DOMAIN_PASS=\"%MGMT_DOMAIN_PASS%\" ^ MGMT_DOMAIN_NAME=%SAN_DOMAIN% ^ CONTROLLER_CSV=%SAN_CONTROLLER_CSV% ^ CONTROLLER_PORT_ISFIXED=TRUE ^ AGENT_LOG_LEVEL=INFO" echo Setup: "%SETUP%" >> "%WRAPLOG%" echo MSI log: "%MSI_LOG%" >> "%WRAPLOG%" echo Command: "%SETUP%" ^ /s ^ /v"/qn %MSI_PROPS% /L*v \"%MSI_LOG%\"" >> "%WRAPLOG%" start /wait "" "%SETUP%" ^ /s ^ /v"/qn %MSI_PROPS% /L*v \"%MSI_LOG%\"" set "RC=%ERRORLEVEL%" echo [%date% %time%] Installer exit code: %RC% >> "%WRAPLOG%" echo Installer exit code: %RC% REM -------- File-based detection marker -------- set "MARKER_DIR=%ProgramData%\DVQagent" set "MARKER_FILE=%MARKER_DIR%\installed.tag" if %RC%==0 ( if not exist "%MARKER_DIR%" mkdir "%MARKER_DIR%" >nul 2>&1 ( echo Installed=1 echo Version=3.1.128 echo OrgID=%SAN_AGENT_ORGID% echo GroupID=%SAN_AGENT_GRPID% echo Domain=%SAN_DOMAIN% echo Controller=%SAN_CONTROLLER_CSV% echo Timestamp=%date% %time% ) > "%MARKER_FILE%" exit /b 0 ) else ( echo [%date% %time%] Skipping marker creation due to installer code %RC% >> "%WRAPLOG%" exit /b %RC% )
Uninstall Code Batch
Shell@echo off setlocal EnableExtensions REM ============================================== REM DVQ Agent - Intune uninstall (safe cleanup) REM ============================================== REM If the agent provides its own uninstaller: set "UNINSTALLER=C:\Program Files\Telchemy\DVQagent\uninstall.exe" if exist "%UNINSTALLER%" ( echo [%date% %time%] Launching vendor uninstaller... start /wait "" "%UNINSTALLER%" /S ) REM Clean up leftover files or logs (optional) rmdir /s /q "%ProgramData%\DVQagent" >nul 2>&1 REM Safe registry cleanup, if any call :RegDelTreeIfExists "HKLM\SOFTWARE\DVQagent" call :RegDelTreeIfExists "HKLM\SOFTWARE\WOW6432Node\DVQagent" exit /b 0 :RegDelTreeIfExists reg query %~1 /reg:64 >nul 2>&1 || goto :eof reg delete %~1 /f /reg:64 >nul 2>&1 goto :eof
Additional Instructions
From Intune
In Intune Admin Center → Apps → Windows → Add → Windows app (Win32):
Field | Value |
App package file | install-DVQ.intunewin |
Name | DVQ Agent 3.1.128 |
Publisher | Telchemy Inc |
Install command | install-DVQ.bat |
Uninstall command | uninstall-DVQ.bat |
Install behavior | System |
Device restart | No specific action |
Return codes | Default (0, 1707, 3010, 1641, 1618) |
Detection Rule
Rule type: File
Path: C:\ProgramData\DVQagent <<< this can also be changed as it will be required for the file marker for install. Change it to C:\ProgramData\NectarEPC
File or folder: installed.tag
Detection method: File exists
Associated with 32-bit app: No
Assignments
Under Assignments → Required, add:
- All devices (or a test device group)
- Notifications: Show all toast notifications
- Install time: As soon as possible
Force sync or wait the allotted time for install. You can monitor on the Windows units IF the notifications have been turned on.