moving shit around
This commit is contained in:
34
old/OLD_Install-Office-2016.ps1
Normal file
34
old/OLD_Install-Office-2016.ps1
Normal file
@@ -0,0 +1,34 @@
|
||||
# Script to install Office ProPlus 2016 VL.
|
||||
# Technolog Networks - 2024-08-21
|
||||
# iRaven
|
||||
|
||||
Start-Transcript -Path "c:\irnh\Install-Office-2016.log" -Append
|
||||
|
||||
$OfficeVersionInstalled = (Get-WmiObject -Class Win32_Product | where name -like "Zabbix*" | select Name, Version).Version
|
||||
$SoftwareDeployLocation = "\\minuette2.technolog.net\SoftwareLibrary\Software\MSOffice\OfficeProPlus2016_VL"
|
||||
|
||||
Function CheckInstall {
|
||||
if ($OfficeVersionInstalled -ne $null) {
|
||||
if ($OfficeVersionInstalled -lt "16.0" ) { # Checks if currently installed Office is less than version 16 (2016)
|
||||
Write-Host "An older version of Office is already installed. Upgrading to 2016."
|
||||
return $false
|
||||
} else {
|
||||
Write-Host "Office 2016 is already installed."
|
||||
return $true
|
||||
}
|
||||
} else {
|
||||
Write-Host "Office is not installed at all."
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
if ((CheckInstall) -eq $false) {
|
||||
cd $SoftwareDeployLocation
|
||||
try {
|
||||
.\setup.exe /adminfile TNGOffice16Deploy.msp
|
||||
} catch {
|
||||
Write-Host "Office 2016 could not be installed."
|
||||
}
|
||||
}
|
||||
|
||||
Stop-Transcript
|
Reference in New Issue
Block a user