Method 1: Exclude administrators in your custom user detection script
Excluding specific administrator users in the custom user detection script ensures the Code42 app waits to perform the installation until the end user signs in to the device.
Sample excerpts of customer user detection scripts with excluded administrator users are listed below. See Deployment script and command reference for Incydr Basic and Advanced for complete details. If you need help customizing a script for your Code42 environment, contact your Customer Success Manager (CSM) to engage the Professional Services team.
Windows script excerpt
REM List of Excluded users that shouldn't be used for Code42 install.
FOR %%G IN ("user1"
"user2"
"user3"
"admin"
"Administrator") DO (
IF /I "%currentuser%"=="%%~G" GOTO NOMATCH
)
:NOMATCH
echo Excluded or null user detected (%currentuser%). Will retry user detection in 60 minutes, or when reboot occurs.
GOTO :EOF
Mac script excerpt
if [[ "$user" =~ ^(admin1|admin2|admin3)$ ]] || [[ -z "$user" ]]; then
writeLog "Excluded or null username detected ($user). Will retry user detection in 60 minutes, or when reboot occurs."
exit
Method 2: Deploy only the installer package
Deploying only the installer package to a gold image helps ensure that the Code42 app detects the correct user, because the installer is executed by the user and not the administrator who deployed the gold image.
Step 1: Get installer files for Code42 apps
There are multiple ways to install Code42 apps, depending on how you wish to authenticate users and devices when the app installs and connects to theCode42 cloud.
The article Manage app installations in your Code42 environment describes three options.
Select one option, and follow the linked instructions until you are told to run an install command or installer executable.
Option 1: Deploy Code42 apps silently with SSO
For a Code42 environment that uses SSO authentication, customize Code42 installers to connect and authenticate automatically. No user intervention is necessary.
Option 2: Install the default Code42 app
Use the default Code42 installer executable, with no customization. The app opens a desktop interface and prompts the user for:
- Username and password
- Registration key (the identifier for for your Code42 organization)
- Server address (the domain URL of the Code42 cloud)
Step 2: Copy your installer files to your gold image
How you copy your Code42 installer files onto your base image depends on your software management tool.
How many and which files you copy also depends on your situation:
- Installer executables are *.msi, *.dmg, or *.tgz files, depending on the image's operating system.
- Mac installations include a plain-text configuration file, deploy.properties.
- Installers are typically invoked with scripts that provide your custom command arguments.
Step 3: Deploy your gold image to your devices
How you deploy a base image to devices is outside the scope of this article. However, you must deploy the image before invoking the installer for the Code42 app.
Step 4: Run the Code42 app installers on your devices
Use a software management tool or the device operating system to launch a script or task that runs the Code42 app installer.
For SSO and manual sign on (options 1 and 2 above), the installer needs to run after a user logs in to the device, because the most recently logged in username becomes the name used to sign in to the Code42 app.