Repackage the DriveLock Agent package manually

Some MDM systems, such as JamfNow, do not support software distribution with scripts. To enable a fully automated installation with these MDM systems, an MDM administrator must configure the specific (organizational) settings for the DriveLock Agent within the Package Installer before the software can be distributed via the MDM system.

Prerequisites:

  • Xcode command line tools has been installed

  • Developer ID Installer certificate of the company has been installed in Keychain

Please do the following:

  1. Unpackage the DriveLock Agent Package Installer:

    % pkgutil --expand /path/to/drivelock/agent.pkg /folder/to/extract/to

    Ensure that the folder you want to extract to does not exist beforehand.

  2. Open the postinstall file with an editor. Such as:

    % vi /extracted/folder/DriveLock_Agent.pkg/Scripts/postinstall

    The postinstall file can also be opened by right-clicking on the DriveLock_Agent.pkg within the extracted folder, select Show Package Contents from the context menu, right-click on file Scripts/postinstall, and open it with your appropriate application, such as Visual Studio Code.

  3. Configure agent settings.

    Fill in DES_URL, DES_TENANT, DES_JOINTOKEN (optionally) according with your company settings and save the file.

  4. Pack the modified Package Installer.

    % pkgutil --flatten /extracted/folder path/of/modified/drivelock/agent.pkg

  5. Sign the modified Package Installer with Developer ID Installer certificate.

    % productsign --sign "Developer ID Installer: Your Company (XXXXXXXXXX)"path/of/modified/drivelock/agent.pkg path/of/signed/drivelock/agent.pkg

  6. Check signature of the newly signed Package Installer

    % pkgutil --check-signature path/of/signed/drivelock/agent.pkg

    The output should be similar to the following:

  7. Once the repackaged Package Installer is properly signed, it is ready to be deployed through a MDM system. The admin can decide if this repackaged Package Installer should be notarized, but it is not mandatory for the further MDM deployment.