MS Intune Deployment for Windows

Prev Next

This document provides the required steps and scripts to deploy the NectarEPC Agent via Microsoft Intune.
All examples below use version 3.1.183; update version numbers and paths as appropriate for your environment.

Prerequisites

Directory Structure

To build the Intune package please make sure that the packages are in a single location.

Example working directory for packaging (paths will vary by customer environment):

C:\Users\testUser\Downloads\NectarEPC-v183\
 │
 ├─ NectarEPClientInstaller64-3.1.183.exe
 ├─ install-nectar.cmd
 ├─ uninstall-nectar.cmd

For assistance, please contact support@nectarcorp.com

Code

In your directory containing the EPC installer executable (NectarEPC-v183 in the example above), add these 2 files:

Note
Note that you must alter install.cmd by inputting the provided parameters for Org ID, Org Group ID, Domain Name, and Domain password.

Replace all values between <...> for the above listed parameters.
Be sure not to delete the \" for Domain Password.

If these parameters were not provided to you, please contact support@nectarcorp.com


install.cmd 

@echo off
setlocal

set "SETUP=%~dp0NectarEPClientInstaller64-3.1.183.exe"
set "LOGDIR=%ProgramData%\NectarEPC\InstallLogs"

if not exist "%LOGDIR%" mkdir "%LOGDIR%" >nul 2>&1

"%SETUP%" /s /v"/qn AGENT_NAME=%USERNAME% AGENT_ORGID=<OrgID> AGENT_GRPID=<OrgGrpID> MGMT_DOMAIN_NAME=<Domain Name> MGMT_DOMAIN_PASS=\"<Insert Password>\" CONTROLLER_CSV=neccontroller.us.nectar.services:40006 CONTROLLER_PORT_ISFIXED=FALSE AGENT_LOG_LEVEL=INFO /L*v %LOGDIR%\NectarEPC_USER.log"

exit /b %ERRORLEVEL%


uninstall.cmd

@echo off
setlocal EnableExtensions EnableDelayedExpansion

set "LOGDIR=%ProgramData%\NectarEPC\InstallLogs"
set "LOG=%LOGDIR%\NectarEPC_uninstall.log"

if not exist "%LOGDIR%" mkdir "%LOGDIR%" >nul 2>&1
echo [%date% %time%] Starting uninstall > "%LOG%"

REM --- Find the Nectar EPC product code ---
for /f "tokens=2 delims={}" %%G in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /s /f "Nectar EPC" 2^>nul ^| find "{"') do (
    set "PRODUCT={%%G}"
    goto :found
)

for /f "tokens=2 delims={}" %%G in ('reg query HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall /s /f "Nectar EPC" 2^>nul ^| find "{"') do (
    set "PRODUCT={%%G}"
    goto :found
)

echo Product code not found >> "%LOG%"
exit /b 0

:found
echo Found product code %PRODUCT% >> "%LOG%"

msiexec /x %PRODUCT% /qn /norestart /L*v "%LOGDIR%\NectarEPC_msi_uninstall.log"

REM --- Cleanup (defensive) ---
rmdir /s /q "C:\Program Files\Nectar\EPC" >nul 2>&1

exit /b %ERRORLEVEL%
``

Packaging Command

The IntuneWinAppUtil.exe must be outside of the NectarEPC-v183 folder. 

Run the following command to build the .intunewin package, after modifying the command so the proper directory paths are reflected:

IntuneWinAppUtil.exe -c C:\Users\username\Downloads\NectarEPC-v183 -s install.cmd -o C:\Users\username\Downloads\NectarEPC-v183\output -q

If the command executes correctly, you should see a file called install.intunewin in the target directory (NectarEPC-v183)

Installation Instructions

Upload App

In Intune Admin Center → Apps → Windows → Add → Windows app (Win32)

You must select Win32.


App Information

Select the installl.intunewin created above. 

FieldValue
App package fileinstall.intunewin
NameNectar EPC 3.1.183
PublisherTelchemy Inc
Installer typeCommand line
Install commandcmd.exe /c install.cmd
Uninstall type Command line
Uninstall commandcmd.exe /c uninstall.cmd
Installation time60 minutes
Allow uninstall Yes 
Install behaviorUser
Device restartNo specific action
CodeType
0Success
1707Success
3010Soft Reboot
1641Hard Reboot
1618Retry

Requirements 

Check operating system architecture: No. Allow this app to be installed on all systems.

Minimum operating system: Windows 11 21H2


Detection Rule

Rules Format: Manually configure detection rules

Click add:

Rule type: File
Path: C:\ProgramData\Nectar\EPC\Agent
File or folder: nectarepc
Detection method: File exists
Associated with 32-bit app: No


Assignments

Under Assignments → Required, add:

All devices (or a test device group)

End User Notifications: Show all toast notifications
Delivery optimization priority: Content download in foreground
Install time: As soon as possible


Conclusion

After the application finishes installing, users should see the Nectar icon in the systray area.

Click on the Status line and you will see:


For additional questions and concerns, please contact support@nectarcorp.com