A year later, but I was in the process of updating our ActivInspire deployment package.
We previously used PDQ Deploy and didn't have too much trouble creating and deploying the package. We now use PDQ Connect (web-based + agent-based) and it's a little different.
ActivInspire.msi needs a host of different files and folders in order to install successfully. I was running into issues uploading everything to PDQ Connect (hit the file limit, etc). The only way I got it to work with PDQ Connect was to copy everything to the target computer (zipped), unzip, run .msi, then clean everything up.
Current PDQ Connect package looks like:
1. Create C:\Temp\ActivInspire if it doesn't exist:
# Define the path$path = "C:\Temp\ActivInspire"# Check if the directory existsif (-Not (Test-Path -Path $path)) { # Create the directory if it doesn't exist New-Item -Path $path -ItemType Directory Write-Output "Directory $path created."} else { Write-Output "Directory $path already exists."}
2. Copy ActivInspire.zip to C:\Temp\ActivInspire
3. Install ActivInspire and clean up C:\Temp\ActivInspire folder
# Define the paths
$zipPath = "C:\Temp\ActivInspire\ActivInspire.zip"$extractPath = "C:\Temp\ActivInspire"$nestedFolderPath = "C:\Temp\ActivInspire\ActivInspire"$msiPath = "$nestedFolderPath\ActivInspire.msi" # Updated to reflect the additional folder created# Function to clean up the directoryfunction Clean-Up { param ( [string]$path ) if (Test-Path -Path $path) { try { Remove-Item -Path $path -Recurse -Force -ErrorAction Stop Write-Output "$path successfully removed." } catch { Write-Output "Failed to remove $path. Error: $_" } } else { Write-Output "$path does not exist." }}# Check if the zip file existsif (Test-Path -Path $zipPath) { # Unzip the file Write-Output "Extracting $zipPath to $extractPath" Add-Type -AssemblyName System.IO.Compression.FileSystem [system.IO.Compression.ZipFile]::ExtractToDirectory($zipPath, $extractPath) # Check if the MSI file exists if (Test-Path -Path $msiPath) { # Run the MSI installer Write-Output "Installing ActivInspire from $msiPath" Start-Process msiexec.exe -ArgumentList "/i `"$msiPath`" /quiet /norestart" -NoNewWindow -Wait # Check if the installation was successful if ($LASTEXITCODE -eq 0) { Write-Output "ActivInspire installed successfully." # Clean up the directory Write-Output "Removing $extractPath" Clean-Up -path $extractPath } else { Write-Output "Installation failed with exit code $LASTEXITCODE." } } else { Write-Output "MSI file $msiPath not found after extraction." }} else { Write-Output "Zip file $zipPath not found."}# Ensure cleanup in case of unexpected failuresClean-Up -path $extractPath
ActivInspire.zip is everything it creates when you run the .exe and tell it to do the network install. Then, using 7zip, zip it up with maximum compression.
Sorry the formatting of the powershell is horrendous. It won't let me do blocks of code.