AutomoxAutomox

Papercut Deployment

CallmePH
April 26, 2024 at 5:23 pm UTC
#Worklets#automox

Has anyone had any success deploying the PaperCut Client via Automox? I have tried every angle I can think of and they all time out, or say it was successful but nothing was installed! From PC’s knowledge base it can be deployed via GPO or “ automated software deployment ”  I am just banging my head here lol

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (6)

jack.smithApril 30, 2024
#1

I've not tried, but looks like they have an MSI installer that might help. https://www.papercut.com/help/manuals/ng-mf/clienttool/user-client-install-windows/

 

Give this a go and review the output in activity log. 

 

powershell2 lines
start-process msiexec -argumentlist "/i pc-client-admin-deploy.msi AUTORUN=1 /qn /norestart /l*v $env:SystemRoot\temp\pc-client-install.log" -wait
Get-Content $env:SystemRoot\temp\pc-client-install.log

 

If you use the EXE you might be able to get the log like this…

powershell2 lines
$log = Get-Childitem "$env:LOCALAPPDATA\Temp\Setup log*"
Get-Content$log.fullname
CallmePHMay 9, 2024
#2

I had tried something like that, however for some silly reason PaperCut requires the .msi and .exe to be ran FROM the server, it requires basically everything inside the “client” folder for a local install.  I have tried the scripting below, it does map the drive but nothing installs?

 

powershell17 lines
# Set network drive information
$DriveLetter = "P"  # Choose the drive letter you want to assign
$NetworkPath = "\\Papercut\PCClient\win"  # Replace with the network path
$ProgramPath = "$NetworkPath\pc-client.exe"  # Replace program.exe with the actual program name

# Map network drive
New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root $NetworkPath -Persist

# Check if the drive is successfully mapped
if (Test-Path "$DriveLetter`:") {
    # Run program from network drive
    Start-Process -FilePath $ProgramPath -Wait

    # Disconnect network drive
    Remove-PSDrive -Name $DriveLetter
} else {
    Write-Host "Failed to map network drive."

the last } is there I just didnt paste right lol 

jack.smithMay 9, 2024
#3

Wondering if maybe you could archive the entire client folder to ZIP, then use PowerShell to Expand-Archive to a local path for installation.

powershell2 lines
Copy-Item client.zip $env:SystemRoot\temp\
Expand-Archive $env:SystemRoot\temp\client.zip

another option, might be to use Set-Location which is similar to typing cd C:\some-path\ in PowerShell

powershell1 line
Set-Location "\\Papercut\PCClient\win"

 

CallmePHMay 9, 2024
#4

Something like this? Its Frankenstein’d from what I used to install another PaperCut monitor.

powershell14 lines
$fileName = 'client.zip'
# Set the path to the client.zip file
$sPath = Split-Path $Script:MyInvocation.MyCommand.Path -Parent
$fPath = "$sPath\$fileName"

# Set the destination folder for unzipping
$destinationFolder = "C:\client"

# Unzip client.zip to C drive
Expand-Archive -Path $zipFilePath -DestinationPath $destinationFolder

# Run program from inside the new folder
Set-Location "$destinationFolder\PCClient\win"
Start-Process -FilePath .\client-local-install.exe

 

CallmePHMay 10, 2024
#5

So this ended up sort of a 3 pronged deployment to get things running right. PaperCut really messed up an easy deployment needing the share etc. BUT, I dropped the zip down, and unzipped it. In a second policy I had it setup a log in task to ensure the shortcut exe worked. Pain but it works!

 

Thanks for the help @jack.smith! Insight got me going the right direction for sure!

Stuart LairdMay 14, 2024
#6

My experience with PaperCut has been that the files stay in place, but the program registration disappears making it look like it is removed.
I no longer work in that environment but it might be worthwhile lodging a ticket with PaperCut as that client is a sinkhole of tech debt and probably needs a rewrite.