Introduction
Automatic enrollment using an `Install.CMD` batch script provides a streamlined method for deploying the HP Insights agent on Windows devices without requiring manual user input during installation. By using a pre-configured script, IT administrators can automate the installation process and enroll devices into the HP Workforce Experience Platform using a Company PIN. This method ensures consistency, reduces deployment time, and enables centralized management of enrolled devices.
This article provides step-by-step guidance for creating and using an `Install.CMD` batch script to enroll Windows devices with the HP Insights agent. This method is ideal for users who want to automate deployment by configuring the script with specific parameters while using the provided Windows executable (`setup.exe`) files.
Target Audience
Primary audience:
IT administrators and support personnel who set up and manage the platform (all roles)
HP Partners who manage customers using the platform
Internal and external developers who integrate with the platform
Secondary audience:
Decision-makers such as Product Managers, Sales teams, and C-suite executives
Prerequisites
You must have IT Administrator privileges.
Devices must be connected to the internet for automatic enrollment.
*Note:* Use alternative methods for devices that cannot connect to the internet.
Procedural Steps
Follow the below steps to automatically enroll Windows devices:
1: Obtain a Company PIN
To obtain a Company PIN:
Log in to WXP. The Home page is displayed.
From the left menu, click Settings > Preferences.
Scroll down to the Company PIN section.
Click the view icon and copy the Company PIN.
Note for HP Partners: After accepting the partner invitation, go to WXP and click Customers > Companies > Company Details > Preferences.
2: Create an Install.CMD Batch Script File
Download the **HP Insights for Windows Application** (`setup.exe`).
Download the sample batch script file here.
Extract the `install.zip` file.
Place both the `setup.exe` file and `Install.CMD` batch script file in a location accessible by all networked computers.
Using a text editor, such as a Notepad, open the Install.CMD to display the following code in the body of the Install.cmd batch script file:
Replace <NetworkShare> with the location of the batch script file.
Refer to line 12 in the script - \\<NetworkShare>\Setup.exe /silent HIDETRAY=True CPIN=<CompanyPIN>
Replace the <Company PIN> with the actual company PIN, without the angular brackets.
Refer to Line 4 of the script and Set "PIN_VALUE=<Company PIN>"
Note: By default, the platform will enroll after auto-updating. To enable enrollment without auto-updating, add UPDATEBEFOREENROLL=0 to the code, like this:
\Setup.exe /silent CPIN=XXXXX UPDATEBEFOREENROLL=0
For devices that cannot connect to the internet
Place the files on a USB drive by replacing <NetworkShare> with a local path, such as C:\Temp.
Save the Install.CMD file.
Note: Device enrollment will fail if network paths contain spaces in the file path.
3: Run the Install.CMD Script File
Browse to the location of the Install.CMD file, either in a network location accessible by all computers or on a USB drive for computers not connected to the network.
Right-click Install.CMD > Run as administrator.
Select Yes if prompted for permission to run the script to install the Windows and automatically enroll the device with the platform.
Wait for the installation to complete.
If the installation is successful, you will see the device in the Windows System Tray, if is HIDETRAY set to False
.
Related Resources
For additional information, refer to the following articles:
Contact Us
For any assistance, create a support case or email [email protected]
.