Skip to main content
Code42 Support

Prepare the Code42 app for deployment

Available in:

StandardPremiumEnterprise
Small Business
Applies to:

Overview

To apply deployment settings to your Code42 apps at installation, such as predefining registration keys or enabling single sign-on authentication methods, you can prepare deployment packages for the Code42 app. You can also configure your Code42 app installers to apply your organization's branding to your Code42 apps.

These instructions apply to Code42 app version 6.x. See other instructions for versions 4.x or 5.x.

Considerations

Our Customer Champions can help you with standard deployment of the Code42 app, but custom installations are beyond the scope of the Customer Champion team. For help with customized installations and deployments (such as using Casper Suite or SCCM), contact sales to work with our PRO Services team.

Step 1: Download files

Download standard installer files for Code42 apps and a custom template file:

  1. Sign on to your administration console
  2. Download Code42 app installer files from App Downloads.
  3. Download custom template files: Save the template files to the same directory as the installers you downloaded above.
  4. Unzip the custom template.
    The custom content template appears in a directory named Code42CrashPlan_Custom.
  5. Your files *.msi, *.dmg, *.tgz and Code42CrashPlan_Custom are all siblings.

Custom directory

Step 2: Co-brand installers

Optionally, you can co-brand your custom installers by displaying your organization's logo alongside the standard Code42 branding.

Co-branding and customization only available with Code42 CrashPlan Enterprise product plan
The following features are only available for customers with the Code42 CrashPlan Enterprise product plan: co-branding and custom text. (Username and password customization is available in all product plans.) 

CrashPlan app version 5.2 with a customized sign-in screen

  1. In the custom directory, create two new subdirectories:
    • Code42CrashPlan_Custom/skin
    • Code42CrashPlan_Custom/skin/co-branding
Verify folder permissions
Verify that the skin folder and its contents have read and execute (755) permissions.
  1. Create custom images for your organization's logo.
    • Example images are included in Code42CrashPlan_Custom/example_skin.
    • Create images with the attributes listed below.
    • Save your images to Code42CrashPlan_Custom/skin/co-branding

5.x co-branding /skin/ directory

File name Supported file types Maximum supported image dimensions Description
about
  • PNG
  • JPG
  • JPEG
  • GIF

Height: 36 pixels

Width: 242 pixels

Displayed on the About screen of the Code42 app
login
  • PNG
  • JPG
  • JPEG
  • GIF

Height: 37 pixels

Width: any pixels

Displayed on the sign-in screen of the Code42 app
splash
  • PNG
  • JPG
  • JPEG
  • GIF

Height: 285 pixels

Width: 238 pixels

Displayed when the Code42 app opens

Step 3: Configure installer properties

Define how your installers behave and how they connect to your server. Use a plain-text editor to edit the file Code42CrashPlan_Custom/custom.properties.

For installers to deploy to Mac systems, optionally also edit Code42CrashPlan_Custom/userInfo.sh

Co-branding and customization only available with Code42 CrashPlan Enterprise product plan
The following features are only available for customers with the Code42 CrashPlan Enterprise product plan: co-branding and custom text. (Username and password customization is available in all product plans.) 

Edit custom.properties

Property name Example values Description
address 192.0.2.100:4282 Your authority server's primary network address (hostname or IP address, and port).
secondaryAddress 192.0.2.101:4282 Your authority server's secondary network address (hostname or IP address, and port).
address
secondaryAddress
central.crashplan.com:443 For the Code42 cloud, both addresses are always central.crashplan.com:443
Code42 app uses port number plus 5
To take advantage of TLS security, Code42 apps version 5.4 add 5 to whatever port number you define in custom.properties. The port number 4282 shown above causes a 5.4 app to use port 4287. It will use port 4282 only as a fallback. TLS communication is the default for version 5.4 Code42 servers and Code42 apps. Earlier 5.x Code42 apps do not add to the configured port number this way.
Property name Example values Description
hideAddress true or false Set to true to hide the server address field during initial registration. Default is false.
lockedAddress true or false Set to true to disable editing of the primary and secondary address fields in the Code42 app. Default is false.
registrationKey 4242-4242-4242-4242 Use the registration key specific to your organization for new user registration.
username ${username}

When the Code42 app first launches, it tries to read the username from one of three sources:

  • a command-line argument CP_USER_NAME
  • an environment variable CP_USER_NAME
  • a Java system property user.name

For the Code42 cloud, the username must be an email address.

password Pre-populate the password using one of the following parameters, or insert a literal password for local (not LDAP or SSO) accounts.
${computername} Computer name of the device.
${generated} Random eight characters.
${uniqueId} A globally unique ID, a large number.
${deferred}

LDAP and SSO auto-register only

Allows the Code42 app to register with the server without providing a password. Requires the user to sign in the first time the Code42 app interface runs.

proxy.enable true or false Set to true if your Code42 app must use a proxy to connect with your Code42 servers. Default is false.
proxy.pacUrl http://<proxy.example.com>/proxy.pac The URL of a ProxyAutoConfig (PAC) file that is accessible to the client.
ssoAuth.enabled true or false

Set to true to enable single sign-on (SSO). Default is false.

If your Code42 environment uses single sign on (SSO) to authenticate users, you must enable the property ssoAuth.enabled. Clients installed without this property enabled will not be able to use SSO.

ssoAuth.required true or false Set to true to require login through single sign-on (SSO) and to hide the "Login with SSO" button. Requires ssoAuth.enabled. Default is false.
 

Edit userinfo.sh

On a Mac, the Code42 app install process identifies startup behavior, home directory, user name, and user file permissions by running unserInfo.sh.

Specify the installer's runtime behavior in the file userInfo.sh.

Variable

Default Values Description
startDesktop

true

If false, the Code42 app does not display after installation.
CP_USER_HOME $HOME The user's home directory. The Code42 app scans and backs up this directory immediately after installation.
user the last directory name in $HOME Used to properly set file permissions. Comments in the file describe other methods for identifying an endpoint's user.
userGroup id -gn "$user" Used to properly set file permissions.
CP_USER_NAME $user

Specifies the username in your Code42 environment.

  • If you leave CP_USER_NAME blank, the Code42 app prompts the user to enter it after installation.
  • If you set this value, you must also set the username attribute in the custom.properties file to:
    username=${username}

For the Code42 cloud, the username must be an email address.

Step 4: Package installers

Combine the standard Code42 app install files (*.msi, *.dmg, and *.tgz) with your Code42CrashPlan_Custom directory to create the custom installers for deployment to user endpoints. You have two options. Use whichever is convenient, given your operating system and environment.

Working on a Mac, create installers for Windows, Mac, and Linux.

Working on Linux, create installers for Windows, Linux.

Working on Windows, create installers for Windows.

Working on Mac, create installers for Mac.

Working on Linux, create installers for Linux.

Option 1: Use the custom.sh script

Run the custom.sh script on Mac or Linux systems to create custom Code42 app installers for Windows, Mac, and Linux systems.

By default, the script attempts to package installers for Windows, Mac, and Linux. To control that behavior, use the following options. To see this list in your command terminal, type ./custom.sh -h.

OS Options:  (only build for this OS)
   -o win         : Build the Windows 32 and 64-bit MSI customized zips
   -o mac         : Customize the Mac installer
   -o linux       : Customize the Linux installer
 
Exclude Options:
   -x win         : Do not build the Windows 32 and 64-bit MSI customized zips
   -x mac         : Do not customize Mac installer
   -x linux       : Do not customize Linux installer
  1. Move your standard Code42 app installer files into your Code42CrashPlan_Custom directory.
  2. In a command-line terminal, navigate to the Code42CrashPlan_Custom directory.
  3. Make sure the custom.sh file is executable:
    chmod +x custom.sh
  4. Run the script:
    ./custom.sh
  5. The script lists the installer properties, then prompts you:
Change settings (yes, no, or reset) [no]?
  • yes: The script prompts you again for each property, one at a time, so that you can change the values.
    Existing values display between square brackets. To accept any value without change, press Enter.
  • no: The script proceeds with the properties as listed.
  • reset: Return the properties to their default values.
  1. To change the properties, run the script again at any time: ./custom.sh.
  2. The script creates new installer files for you to deploy:
    • *.zip is for Windows
    • *.dmg is for Mac
    • *.tgz is for Linux.

Option 2: Manually package installers

Create *.zip, *.dmg, and *.tgz files for deployment as follows:

Package installers for Windows

  1. Rename the Code42CrashPlan_Custom directory to custom.
  2. Select the custom directory and a *.msi file.
  3. Right-click to select Send to > Compressed (zipped) folder.

Package installers for Windows

Package installers for Mac

  1. Double-click the *.dmg installer file. volume icon
    The file mounts. A new icon appears on your desktop to represent the Code42CrashPlan volume.
  2. Open a command line terminal.
  3. Find and note the full path of your Code42CrashPlan_Custom directory.
  4. Go to /Volumes:
    cd /Volumes
  5. Open the directory that has the name of the *.dmg file, for example
    cd Code42CrashPlan
  6. Copy your Code42CrashPlan_Custom directory into the current directory, and name it .Custom
    cp -r /Users/<userName>/<path>/<filename>_Custom ./.Custom
  7. Close the terminal window.
  8. Right-click on the *.dmg icon and select Eject.
$ cd /Volumes
$ ls -al
Code42CrashPlan 
Macintosh HD
$ cd Code42CrashPlan
$ cp -r /Users/<yourname>/<path>/<name>_Custom ./.Custom
$ ls -al
.Custom 
Install Code42 CrashPlan.pkg 
Uninstall.app

Package installers for Linux

  1. Find and note the full path of your Code42CrashPlan_Custom directory.
  2. Unpack the *.tgz:
    The result is a new directory crashplan-install/.
    tar -xzvf<filename>_Linux.tgz
  3. Copy your Code42CrashPlan_Custom directory into that new directory, and name it .Custom:
    cp -r <path>/<filename>_Custom crashplan-install/.Custom
  4. Repackage the *.tgz file:
    tar -czvf -mode=rwx <filename>_Linux.tgzcrashplan-install/

Step 5: Deploy installers

After packaging your custom installers according to Option 2 above, deploy the resulting *.zip, *.dmg, and *.tgz files to the devices in your Code42 environment.

When the Code42 app deploys at an endpoint device, your software management tool and further scripting can control whether the Code42 app opens on the desktop, and control its username and home directory, as described below.

Deploy on Windows devices

Set the following variables as command-line options in a batch or PowerShell script that passes those values to the Code42 app installer:

Variable Example Values Description
CP_SILENT true or false
Default is false
If true, the Code42 app does not display after installation.
CP_USER_HOME C:\Users\username Specifies the user's home directory. The Code42 app scans and backs up this directory immediately after installation.
CP_USER_NAME username

Specifies the username in your Code42 environment.

  • If you leave CP_USER_NAME blank, the Code42 app prompts the user to enter it after installation.
  • If you set this value, you must also set the username attribute in the custom.properties file to:
    username=${username}

For the Code42 cloud, the username must be an email address.

CP_REG_KEY
Optional
AAAA-BBBB-CCCC-DDDD

The registration key for an organization in your Code42 environment.

Use this variable only if the custom.properties file does not provide a registration key.

Example deployment script for Windows

This script is an example and is not guaranteed or supported.

@ECHO OFF

REM Script grabs currently logged in user and user home; installs silently. Compatible with running the installer as administrator or another user.

REM Determine which user lauched explorer.exe, presumes that this is a domain account user
for /f "TOKENS=1,2,*" %%a in ('%systemroot%\system32\tasklist.exe /FI "IMAGENAME eq explorer.exe" /FI "STATUS eq running" /FO LIST /V') do if /i "%%a %%b"=="User Name:" set _currdomain_user=%%c
REM in the case of no domain account, change "currdomain_user" to "curruser", otherwise you need the line, below, to trim out the domain and wind up with "curruser"
for /f "TOKENS=1,2 DELIMS=\" %%a in ("%_currdomain_user%") do set _currdomain=%%a & set _curruser=%%b

SET CP_USER_NAME=%_curruser%
ECHO UserName: %CP_USER_NAME%
REM The user's home directory (Windows Vista and newer), used in backup selection path variables.
SET CP_USER_HOME=C:\Users\%_curruser%
 
ECHO UserHome: %CP_USER_HOME%
REM Tells the installer not to run CrashPlan client interface following the installation.
SET CP_SILENT=true
ECHO Silent: %CP_SILENT%
SET CP_ARGS="CP_USER_NAME=%CP_USER_NAME%&CP_USER_HOME=%CP_USER_HOME%"
ECHO Arguments: %CP_ARGS%
 
REM 64-bit Windows installer. You can use any of the msiexec command-line options.
ECHO Installing CrashPlan...
"%~dp0Code42CrashPlan.msi" /qn /l* install.log CP_ARGS=%CP_ARGS% CP_SILENT=%CP_SILENT%

To install the Code42 app for a single user, rather than all users of the device, add three options to the final line of the script:

ALLUSERS=2 MSIINSTALLPERUSER=1 INSTALL_PER_USER=1

Deploy on Mac devices

To install the Code42 app for a single user, rather than all users of the device, use the -target option in the install command:

installer -pkg <path>/<filename>.pkg -target CurrentUserHomeDirectory

Deploy on Linux devices

On Linux systems, control deployment by changing the .Custom/custom.properties file before running the install script.