diff options
| author | WindowsAddict | 2024-01-01 01:56:49 +0000 |
|---|---|---|
| committer | WindowsAddict | 2024-01-01 01:56:49 +0000 |
| commit | 1c4e85b3e29391567a6a0aa9f451780ab2093dd1 (patch) | |
| tree | 6d8e67885a39db9a35cac27f8dcc1dce843a38cf | |
| parent | 0c1d091c7e9846090a049cecabf7e2097a45ebd4 (diff) | |
| download | Microsoft-Activation-Scripts-1c4e85b3e29391567a6a0aa9f451780ab2093dd1.zip | |
Fix bug in pending reboot check
| -rw-r--r-- | MAS/Separate-Files-Version/Change_Edition.cmd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MAS/Separate-Files-Version/Change_Edition.cmd b/MAS/Separate-Files-Version/Change_Edition.cmd index 28a7230..8de859f 100644 --- a/MAS/Separate-Files-Version/Change_Edition.cmd +++ b/MAS/Separate-Files-Version/Change_Edition.cmd @@ -742,8 +742,8 @@ exit /b function Test-PendingReboot
{
if (Test-Path -Path "$env:windir\WinSxS\pending.xml") { return $true }
- 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-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -EA SilentlyContinue) { return $true }
+ if (Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -EA SilentlyContinue) { return $true }
try {
$util = [wmiclass]"\\.\root\ccm\clientsdk:CCM_ClientUtilities"
$status = $util.DetermineIfRebootPending()
|
