diff --git a/apps/OFFICE/install.ps1 b/apps/OFFICE/install.ps1 new file mode 100644 index 0000000..534ca0e --- /dev/null +++ b/apps/OFFICE/install.ps1 @@ -0,0 +1,34 @@ +function Test-PendingReboot { + if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA Ignore) { return $true } + if (Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA Ignore) { return $true } + if (Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name PendingFileRenameOperations -EA Ignore) { return $true } + try { + $util = [wmiclass]"\\.\root\ccm\clientsdk:CCM_ClientUtilities" + $status = $util.DetermineIfRebootPending() + if (($null -ne $status) -and $status.RebootPending) { + return $true + } + } + catch { } + + return $false +} + +$msiexec = Get-Process msiexec +if ($msiexec) { + Write-Error "MSI is Running" + exit 1 +} + +if (Test-PendingReboot){ + Write-Error "MSI is restart pending" + exit 1 +} + +$parameters = @("scenario=install", "scenariosubtype=ARP","sourcetype=None","productstoremove=AccessRuntimeRetail.16_en-us_x-none","culture=en-us","version.16=16.0") +Start-Process -FilePath "C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" -ArgumentList $parameters -Wait + +$parameters = @("scenario=install", "scenariosubtype=ARP","sourcetype=None","productstoremove=AccessRuntimeRetail.16_fr-fr_x-none","culture=fr-fr","version.16=16.0") +Start-Process -FilePath "C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" -ArgumentList $parameters -Wait + +exit 0 \ No newline at end of file diff --git a/apps/FortigateVPN/bin/FortiClient_v7.4.0.1658.msi b/apps/Omnissa-Horizon-Client/bin/Omnissa-Horizon-Client-2412-8.14.0-12437220870.exe similarity index 52% rename from apps/FortigateVPN/bin/FortiClient_v7.4.0.1658.msi rename to apps/Omnissa-Horizon-Client/bin/Omnissa-Horizon-Client-2412-8.14.0-12437220870.exe index 27b685e..04179de 100644 Binary files a/apps/FortigateVPN/bin/FortiClient_v7.4.0.1658.msi and b/apps/Omnissa-Horizon-Client/bin/Omnissa-Horizon-Client-2412-8.14.0-12437220870.exe differ diff --git a/apps/Omnissa-Horizon-Client/install.ps1 b/apps/Omnissa-Horizon-Client/install.ps1 new file mode 100644 index 0000000..133a2ec --- /dev/null +++ b/apps/Omnissa-Horizon-Client/install.ps1 @@ -0,0 +1,23 @@ +# array of uninstall args +$uninstallArgs = "/uninstall"," ","/quiet" +$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "VMWare Horizon Client" } + +foreach ($version in $dotnetVersions) { + # update array index 1 with version id + $uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"' + Write-Host "Uninstalling $($version.Name)... $("$uninstallArgs")" + Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait +} + +Write-Host "All VMWare Horizon Client versions uninstalled." + +$installerName = "Omnissa-Horizon-Client-2412-8.14.0-12437220870.exe" +$installerPath = ('./bin/' + $installerName) +if (-not (Test-Path -Path $installerPath)){ + Invoke-WebRequest -Uri $uri -OutFile $installerPath +} + +$installArgs = "/s" +Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait + +Write-Host ("VMWare Horizon Client installed: " + $installerName) diff --git a/apps/dotNET/install.ps1 b/apps/dotNET/install.ps1 index 7d8c48c..75255dc 100644 --- a/apps/dotNET/install.ps1 +++ b/apps/dotNET/install.ps1 @@ -1,6 +1,6 @@ # array of uninstall args $uninstallArgs = "/uninstall"," ","/quiet", "IGNOREDEPENDENCIES=ALL" -$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "Microsoft .NET*" } +$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "Microsoft Windows Desktop Runtime*" } foreach ($version in $dotnetVersions) { # update array index 1 with version id @@ -11,8 +11,8 @@ foreach ($version in $dotnetVersions) { Write-Host "All Microsoft .NET versions uninstalled." -#$uri = "https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe" -$uri = "https://download.visualstudio.microsoft.com/download/pr/136f4593-e3cd-4d52-bc25-579cdf46e80c/8b98c1347293b48c56c3a68d72f586a1/dotnet-runtime-8.0.12-win-x64.exe" +$uri = "https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe" +#$uri = "https://download.visualstudio.microsoft.com/download/pr/136f4593-e3cd-4d52-bc25-579cdf46e80c/8b98c1347293b48c56c3a68d72f586a1/dotnet-runtime-8.0.12-win-x64.exe" $installerName =($uri -split "/")[-1] $installerPath = ('./bin/' + $installerName) if (-not (Test-Path -Path $installerPath)){ diff --git a/build.ps1 b/build.ps1 index 643f433..5f5da67 100644 --- a/build.ps1 +++ b/build.ps1 @@ -17,7 +17,7 @@ foreach ($folder in (Get-ChildItem -Path "./apps/" )) { } } - Remove-Item -Path ("./build/{0}.intunewin" -f $folder.Name) -Force + Remove-Item -Path ("./build/{0}.intunewin" -f $folder.Name) -Force -ErrorAction SilentlyContinue $buildArgs = "-c", $folder.FullName, "-s", $sourceFile.FullName, "-o", "./build/", "-q" Start-Process -FilePath ('./v{0}/Microsoft-Win32-Content-Prep-Tool-{0}/IntuneWinAppUtil.exe' -f $version) -ArgumentList "$buildArgs" -Wait Move-Item -Path ("./build/{0}.intunewin" -f ($sourceFile.Name -split "\.")[0]) -Destination ("./build/{0}.intunewin" -f $folder.Name)