2025-08-05 02:57:47 +00:00
|
|
|
<#
|
|
|
|
|
Author: Gabe Kerntke
|
|
|
|
|
Company: UFS LLC
|
|
|
|
|
Date: 07-16-2025
|
|
|
|
|
|
|
|
|
|
.Synopsis
|
|
|
|
|
Script to install Adobe Acrobat 64bit
|
|
|
|
|
|
|
|
|
|
.Modified
|
|
|
|
|
2025-07-16 (GabeK) - Original script created
|
|
|
|
|
#>
|
|
|
|
|
|
|
|
|
|
[CmdletBinding()]
|
|
|
|
|
Param(
|
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
|
|
|
$App_Name = "Adobe Acrobat",
|
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
|
|
|
$File_Name_Prefix = "Adobe-Acrobat-x64",
|
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
|
|
|
$File_Name_Extension = "zip",
|
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
|
|
|
$Install_Parameters = "/sAll /rd",
|
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
|
|
|
$EPCache_Folder = "3rd Party Patches\$App_Name",
|
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
|
|
|
$File_Name = "$File_Name_Prefix.$File_Name_Extension"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Define a script block that contains the Invoke-WebRequest command
|
|
|
|
|
$scriptBlock = {
|
|
|
|
|
(Invoke-WebRequest -UseBasicParsing -Headers @{
|
|
|
|
|
"accept" = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
|
|
|
|
|
"accept-encoding" = "gzip, deflate, br"
|
|
|
|
|
"accept-language" = "en-GB,en;q=0.9,en-US;q=0.8"
|
|
|
|
|
} -Uri "https://helpx.adobe.com/acrobat/kb/acrobat-dc-downloads.html").Links.href -like "*Acrobat_DC_Web_x64_WWMUI.zip"| Select-Object -First 1
|
|
|
|
|
}
|
|
|
|
|
#Start a new PowerShell background job and pass the script block to it
|
|
|
|
|
$job = Start-Job -ScriptBlock $scriptBlock
|
|
|
|
|
|
|
|
|
|
#Wait for the job to complete
|
|
|
|
|
$timeout = 30
|
|
|
|
|
Wait-Job $job -timeout $timeout | Out-Null
|
|
|
|
|
|
|
|
|
|
#Get the output from the job and display it
|
|
|
|
|
$output = Receive-Job $job
|
|
|
|
|
$DownloadURL = $output
|
|
|
|
|
|
2025-08-05 03:01:34 +00:00
|
|
|
#Region Script Start
|
2025-08-05 02:57:47 +00:00
|
|
|
If ((Test-Path "C:\Temp\Script Cache") -eq $False) { New-Item -ItemType directory -Path "C:\Temp\Script Cache" }
|
|
|
|
|
Invoke-WebRequest -UseBasicParsing "https://scripts.gabesville.com/Gabesville/Powershell-Scripts/raw/branch/main/Functions%20Scripts/Functions.ps1" -outfile "C:\Temp\Script Cache\Functions.ps1"
|
|
|
|
|
. "C:\Temp\Script Cache\Functions.ps1"
|
|
|
|
|
|
|
|
|
|
#Check to see if program is installed
|
|
|
|
|
$Applist = Get-Software | Sort-Object -Descending
|
|
|
|
|
|
|
|
|
|
If ($Applist.DisplayName -like "*$App_Name*64-bit*") {
|
|
|
|
|
#Get currently installed version
|
|
|
|
|
$Local_Version = Get-Software | Where-Object { $_.DisplayName -like "*$App_Name*" } | Select-Object -ExpandProperty DisplayVersion
|
|
|
|
|
Write-Host "$App_Name already installed. (Installed version: $Local_Version)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Else {
|
|
|
|
|
Test-Probe_Online
|
|
|
|
|
Expand-Archive $EPCacheLocalLocation -DestinationPath "C:\Temp\Script Cache" -Force
|
|
|
|
|
Remove-Item $EPCacheLocalLocation -Force
|
|
|
|
|
$EPCacheLocalLocation = "C:\Temp\Script Cache\Adobe Acrobat\setup.exe"
|
|
|
|
|
Install-App
|
|
|
|
|
}
|
2025-08-05 03:01:34 +00:00
|
|
|
#Region Script End
|