minor rearranging

This commit is contained in:
2025-10-03 22:45:57 -05:00
parent 4af8ff2fa2
commit 080034b176
5 changed files with 85 additions and 73 deletions

View File

@@ -4,7 +4,7 @@
Start-Transcript -Path "c:\irnh\Install-MSOffice.log" -Append
$SoftwareDeployLocation = "\\minuette2.technolog.net\SoftwareLibrary\Software\MSOffice"
$SoftwareDeployLocation = "\\minuette2.technolog.net\Software\Software\MSOffice"
$ParamVersion = $args[0]
# Office Install Checks
@@ -18,7 +18,7 @@ $Office2024 = (Get-WmiObject -Class Win32_Product | where name -like "Microsoft
Function CheckInstall {
if ($null -ne $OfficeVersionInstalled) {
if ($OfficeVersionInstalled -ge "16.0" ) { # Checks if currently installed Office is less than version 16 (2016)
if ($null -eq $Office2016 -and $ParamVersion -eq 2016) {
if ($null -ne $Office2016 -and $ParamVersion -eq 2016) {
Write-Host "Office $ParamVersion is already installed. No action will be taken."
return $true
} elseif ($null -ne $Office2019 -and $ParamVersion -eq 2019) {