+1 (781) 205-9750 info@data-minds.com
Follow us

NetDocuments ndOffice Client Component Deployment Leveraging JumpCloud and Chocolatey

Create and Publish Chocolatey Packages and Deploy the Software with JumpCloud Device Management in the Admin Portal


JumpCloud leverages Chocolatey, a popular package manager for Windows, to install software  such as NetDocuments ndOffice on Windows devices. While there is an official guide on how to create and publish packages, this post focuses on installation and management of NetDocuments client components. 

Create the Package

First, install Chocolatey if you haven’t done yet. Then, add %CHOCOLATEY_INSTALLATION%bin to the PATH environmental variable, where %CHOCOLATEY_INSTALLATION% is the Chocolatey installation path, such as C:\ProgramData\chocolatey.

Now, create a working directory, such as \workbench\mychoco-packages for your work and one for the component at hand, such as ndOffice. In this directory (using Visual Studio Code or similar IDE), create a file named ndOffice.nuspec, as in the below:

<?xml version="1.0" encoding="utf-8"?>
<package>   
<metadata>       
​<id>ndoffice</id>       
​<version>3.3</version>       
​<title>NetDocuments ndOffice component package.</title>       
​<authors>Data Minds</authors>       
​<description>ndOffice package for distribution with Jump Cloud.</description>       
​<tags>NetDocuments ndOffice</tags>       
​<requireLicenseAcceptance>false</requireLicenseAcceptance>       
​<releaseNotes/>       
​<copyright>Copyright 2023</copyright>       
​<projectUrl>https://support.netdocuments.com/s/article/205220000#download</projectUrl>       
​<projectSourceUrl>https://www.data-minds.com/blog/blog-1/netdocuments-integrations-leveraging-jumpcloud-and-chocolatey-3</projectSourceUrl>       
​<summary>This is to help distribute the NetDocuments ndOffice component to devices with JumpCloud leveraging Chocolatey.</summary>   
</metadata>
</package>


Avoid common mistakes when creating the nuspec files:

  • id is the package name and should meet the following criteria:
    • should contain no spaces and weird characters.
    • should be lowercase.
    • should separate spaces in the software name with - e.g. classic-shell. 
  • version is a dot-separated identifier containing a maximum of 4 numbers, e.g. 3.3 or 3.3.0.16 - except for prerelease packages.
  • tags need included as space separated to help with categorization.
  • projectUrl: the "software project site" url is required.

Now, create a tools directory, and a chocolateyInstall.ps1 file in there as  follows:

$packageName='ndoffice'
$installerType='exe'
$url='https://apps.netdocuments.com/apps/ndOffice/ndOfficeSetup.exe'$url64='https://apps.netdocuments.com/apps/ndOffice/ndOfficeSetup.exe'#Reportedly, the 64 bit line can be ommitted but automated testing w/o it failed, hence added the path. $silentArgs='/SILENT'
$validExitCodes=@(0,3010)

Install-ChocolateyPackage $packageName $installerType $silentArgs $url $url64 -validExitCodes $validExitCodes


Open an Elevated Command Prompt (Elevated is key if your account is not an admin one), and navigate to your ndOffice working directory. Run chocolatey pack on the command line. That should create an ndoffice.3.3.nupkg there in the current directory — this is the package.

Test the Package

Run the following command in ndOffice directory to test your package:

choco install ndoffice -source %cd%

Publish the Package

To publish the package use the push command. Register with and log into chocolatey.org and navigate to Get the API Key section. Then follow the instructions which should look like in the below:

choco apikey --key [API-KEY-HERE] --source https://push.chocolatey.org/
choco push MyPackage.1.0.nupkg --source https://push.chocolatey.org/

At the time of our push, the lines were as in the below:

choco apikey --key 1ba82512-e0fb-4b86-991c-1c0a1d515e36 --source https://push.chocolatey.org/ 
choco push ndoffice.3.3.nupkg --source https://push.chocolatey.org/

This should help you prepare the ndOffice (and other) packages for NetDocuments client integrations. For more general information, check out the official Chocolatey Documentation

Deploy the Package with the JumpCloud Console

Now, you can identify the Package ID from the https://chocolatey.org/ community package repository, in this case it can be found here: 

https://community.chocolatey.org/packages/ndoffice

and install the software on Windows devices using the JumpCloud Software Management option in the admin console.