This tutorial allows you to automate the installation of the DCA Agent and Cloud Connector on new computers during Windows installation using customized installation media (USB drive/ISO).
At the end of the operating system installation, a temporary entry is created in Windows to automatically run the agent installer when the user logs in for the first time.
Warning
-
This tutorial has been validated in a Windows 10 environment using the OEM method.
-
NDD does not provide support for creating or customizing Windows installation USB drives/ISOs.
-
The scripts provided are for illustrative purposes only and serve solely as a reference for implementation.
-
Depending on the version of Windows used, there may be differences in the installation process and in the behavior of the scripts.
How it works
The method uses the Windows installer’s OEM framework to run a script during the operating system installation.
This script creates an entry in the following Windows Registry Editor key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
The created entry points to the agent installer located at:
C:\Windows\Setup\Scripts\NDD_DCAandCloudConnector_1.X.X.exe
On the first login after Windows installation, the operating system automatically runs the agent installer and removes the entry from the RunOnce key, ensuring that the execution occurs only once.
Prerequisites
-
Official Windows installation USB drive/ISO.
-
Permission to customize the Windows installation media.
Instructions
-
Download the DCA and Cloud Connector installer as instructed at Install the DCA and Cloud Connector agent on Windows
Information
The installer file can be obtained from the portal or via the default installer, as described in the documentation.
-
Download one of the .cmd files provided below, depending on the desired behavior during installation:
-
Silent installation (quiet mode): installs the agent without user interaction: SetupComplete - Quiet.cmd
-
Interactive installation: displays the installer screen so the user can follow along and complete the installation: SetupComplete.cmd
-
-
Open the downloaded .cmd file in a text editor, such as Notepad, and on line 8, replace NDD_DCAandCloudConnector_1.X.X.exe with the exact name of the installer downloaded in step 1
Example
If the downloaded file is:
NDD - Network Printer Monitoring.exe
Line 8 of the .cmd script should be adjusted to:
/d "\"C:\Windows\Setup\Scripts\NDD - Network Printer Monitoring.exe\"" ^
-
On the Windows installation media (USB drive/ISO), create the following directory:
X:\sources\$OEM$\$$\Setup\Scripts\
-
Inside the Scripts folder, add:
-
The .exe file of the agent installer, downloaded in step 1
-
The .cmd file of the installation script, downloaded in step 2 and adjusted in step 3
-
Example
The folder will have the following structure:
X:\sources\$OEM$\$$\Setup\Scripts\
├── NDD_DCAandCloudConnector_1.X.X.exe
└── SetupComplete.cmd
Information
If you want to test the script’s behavior before deployment, run it manually on a computer with Windows already installed.
Next, open the Windows Registry Editor and access:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
Check if an entry similar to the following has been created:
Name: InstalarMeuSistema
Type: REG_SZ
Data: "C:\Windows\Setup\Scripts\NDD_DCAandCloudConnector_1.X.X.exe"
The presence of this entry indicates that the script ran successfully.
-
Proceed with the Windows installation as usual using the prepared media
During the installation process, the .cmd script will register the agent installer in the RunOnce key of the Windows Registry Editor.
What happens after Windows installation
After Windows installation is complete using the USB drive/ISO:
-
The user logs in for the first time
-
Windows checks the entries configured in the RunOnce key
-
The DCA and Cloud Connector installer runs automatically
-
If silent installation (quiet mode) was chosen, the installation will occur without user interaction.
-
If the graphical installation was chosen, the installer screen will be displayed.
-
Warning
After the first login to the newly installed Windows, wait for the agent installation to complete before shutting down or restarting the equipment.
-
The entry created in the RunOnce key is automatically removed by Windows, so it is not possible to reuse the same entry to run the installation again
-
The agent completes its installation
After installing DCA and Cloud Connector, access the documentation corresponding to your monitoring objective and continue the configuration of the environment:
Log files
During script execution, the following log files are generated:
C:\NDD - DCA and Cloud Connector.log
C:\SetupMeuSistema.log
These files can be used to validate script execution and help identify potential failures.