Installing Local Integrations for PaperCut MF and PaperCut NG - PaperCutSoftware/PaperCutExamples GitHub Wiki

A PaperCut MF integration (e.g. a custom sync and auth module) often needs installation on the application server and creating an installation script, or standalone installer, can save your support team a lot of time and frustration. This tip will help you write a more robust installer, by correctly locating where on the file system PaperCut MF is installed.

Knowing the correct installation directory allows you to:

  • configure your integration with the location of the PaperCut MF installation for later use,

  • run the PaperCut MF server-command utility to configure internal PaperCut MF settings needed by your integration, or

  • install or update other PaperCut MF settings, for example payment gateway properties files.

  • install your integration into the correct directory, (NOTE: Installing third party files into the PaperCut MF installation directory is not generally recommended)

This information also applies to PaperCut NG as well. Just make the obvious changes.

Windows

The usual default is C:\Program Files\PaperCut MF, but it's not guaranteed. Luckily PaperCut MF writes the final location in the Windows registry under the key HKLM:\HKEY_LOCAL_MACHINE\SOFTWARE\PaperCut MF.

Here is an example PowerShell snippet that allows you to recover the InstallPath value and install your integration in an adjacent directory tree

mkdir "$((Get-ItemProperty -Path "HKLM:\HKEY_LOCAL_MACHINE\SOFTWARE\PaperCut MF").InstallPath)\..\MyIntegration"
$myInstallPath =  resolve-path "$((Get-ItemProperty -Path "HKLM:\HKEY_LOCAL_MACHINE\SOFTWARE\PaperCut MF").InstallPath)\..\MyIntegration"
... install into $myInstallPath

or an example that runs server-command to update an advanced config key required by the custom sync and auth module

& "$((Get-ItemProperty -Path 'HKLM:\HKEY_LOCAL_MACHINE\SOFTWARE\PaperCut MF').InstallPath)\server\bin\win\server-command.exe" `
       set-config "user-source.update-user-details-card-id" "Y"

Linux

On GNU/Linux PaperCut MF is installed into the home directory of the papercut user.

TOP TIP: When you create the papercut account (before installing PaperCut MF) set the new user's home directory to /usr/local/papercut, instead of /home/papercut.

The papercut home directory name can be discovered using different means. For example in a modern shell script via ~paperecut or getent passwd papercut | cut -d : -f 6

macOS

It's always /Applications/PaperCut MF