You are viewing limited content. For full access, please sign in.

Discussion

Discussion

Deploying Laserfiche 12.02 via Intune

posted on February 6 Show version history

We tried various ways to get this to install and finally found a decent option that was pretty easy to deploy and update via Intune. 

I just downloaded the apps we needed to a folder on the C drive. 

Packaged the app as Win32 and just used a powershell script: 

# -------------------------------
# Configurable Paths & Packages
# -------------------------------
$LFGetPath  = 'C:\LFTemp\lf12.02\LFGet.exe'
$SourceRoot = 'C:\LFTemp\lf12.02'
$LogDir     = Join-Path $env:ProgramData 'LFInstallLogs'
$TempDir    = Join-Path $env:TEMP 'LFTemp'

# List of package EXE filenames (must exist under $SourceRoot)
$Packages = @(
    'Snapshot 12.0.2509.942.exe'
    'WebToolsAgent 11.0.2509.11.exe'
    'OCR 12.0.2509.116.exe'
    'OfficePluginSetup 11.1.2601.902.exe'
    'ScanningSetup 12.0.2507.188.exe'
    'WindowsClient 12.0.2510.972.exe'
)

# -------------------------------
# Prep logging
# -------------------------------
New-Item -ItemType Directory -Path $LogDir -Force | Out-Null
New-Item -ItemType Directory -Path $TempDir -Force | Out-Null

$timestamp   = Get-Date -Format 'yyyyMMdd-HHmmss'
$PSLog       = Join-Path $LogDir "LF_Install_$timestamp.log"
Start-Transcript -Path $PSLog -Append | Out-Null

Write-Host "Installing Laserfiche components..." -ForegroundColor Cyan

# -------------------------------
# Helper: Install one package
# -------------------------------
$global:NeedsReboot = $false
$global:Failures    = @()

function Install-LFPackage {
    param(
        [Parameter(Mandatory=$true)][string] $ExeName
    )

    $packagePath = Join-Path $SourceRoot $ExeName

    if (!(Test-Path -LiteralPath $packagePath)) {
        $msg = "MISSING: $packagePath not found."
        Write-Warning $msg
        $global:Failures += $msg
        return
    }

    if (!(Test-Path -LiteralPath $LFGetPath)) {
        $msg = "MISSING: LFGet.exe not found at $LFGetPath."
        Write-Error $msg
        $global:Failures += $msg
        return
    }

    $args = @(
        'install-local-package'
        '--package', "`"$packagePath`""
        '--iacceptlicenseagreement'
        '--iagreetoprereqs'
        '--log', "`"$LogDir`""
        '--temp-dir', "`"$TempDir`""
    )

    Write-Host "Installing: $ExeName" -ForegroundColor Yellow
    $proc = Start-Process -FilePath $LFGetPath -ArgumentList $args -Wait -PassThru -WindowStyle Hidden

    $exitCode = $proc.ExitCode
    Write-Host "ExitCode ($ExeName): $exitCode"

    switch ($exitCode) {
        0 { return }
        3010 { $global:NeedsReboot = $true; return }
        1641 { $global:NeedsReboot = $true; return } # 1641 = hard reboot required (MSI)
        default {
            $msg = "FAILED ($ExeName): ExitCode=$exitCode"
            Write-Error $msg
            $global:Failures += $msg
        }
    }
}

# -------------------------------
# Execute all installs
# -------------------------------
foreach ($pkg in $Packages) {
    Install-LFPackage -ExeName $pkg
}

Stop-Transcript | Out-Null

# -------------------------------
# Return proper exit code to Intune
# -------------------------------
if ($global:Failures.Count -gt 0) {
    Write-Host "One or more installations failed. See $PSLog and component logs in $LogDir." -ForegroundColor Red
    exit 1
}

if ($global:NeedsReboot) {
    Write-Host "Installations succeeded, reboot required." -ForegroundColor Yellow
    exit 3010
}

Write-Host "All installations succeeded." -ForegroundColor Green
exit 0

It seems to work much easier than the rest of the ways I have found.  

1 0
replied two days ago

Hi Jayson, thanks for sharing this with the community. The exit codes for Intune are a nice touch.

Did you happen to see the PowerShell scripts I wrote for unattended installation scenarios? Link: New Laserfiche version 2025 H2 (Fall release) -- Unattended Installation (LFGet.exe) - Laserfiche Answers

0 0
replied two days ago

I could never get ours to work for some reason.  The only way I could get them to deploy was to download them from the installer after entering the installation code. Then deploying those with a bat file or powershell.  

I want to install them from Laserfiche instead of having to download them.  We are having issues with slow internet not liking ours. Honestly the new client is plagued with changes that my employees dont like.  The web version works fine but they just wont change.  This might be that final push to get rid of the Desktop Client for good. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.