mirror of
https://git.steelants.cz/JonatanRek/INT_PKG_BUILDER.git
synced 2026-10-11 13:45:32 +00:00
Omnissa Horizon
This commit is contained in:
1 parent
57c10bfebc
commit
9a170d3acb
5 files changed
+61
-4
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user