spelling
parent
d987820bf8
commit
7ef9bf0c2c
|
@ -34,7 +34,10 @@
|
|||
"msiexec",
|
||||
"VERYSILENT",
|
||||
"SUPPRESSMSGBOXES",
|
||||
"subfolders"
|
||||
"subfolders",
|
||||
"explorerprocesses",
|
||||
"SASURL",
|
||||
"LASTEXITCODE"
|
||||
],
|
||||
"ignorePaths": [
|
||||
".github/*",
|
||||
|
|
|
@ -314,7 +314,7 @@ $Script:IsElevated = $CurrentPrincipal.IsInRole([Security.Principal.WindowsBuilt
|
|||
$WAURegKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate\"
|
||||
$Script:WAUInstallLocation = Get-ItemProperty $WAURegKey -ErrorAction SilentlyContinue | Select-Object -ExpandProperty InstallLocation
|
||||
|
||||
#LogPath initialisation
|
||||
#LogPath initialization
|
||||
if (!($LogPath)) {
|
||||
#If LogPath is not set, get WAU log path
|
||||
if ($WAUInstallLocation) {
|
||||
|
@ -326,7 +326,7 @@ if (!($LogPath)) {
|
|||
}
|
||||
}
|
||||
|
||||
#Logs initialisation
|
||||
#Logs initialization
|
||||
if (!(Test-Path $LogPath)) {
|
||||
New-Item -ItemType Directory -Force -Path $LogPath | Out-Null
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ if ($IsElevated -eq $True) {
|
|||
$null = Update-Winget
|
||||
#Reload Winget command
|
||||
$Script:Winget = Get-WingetCmd
|
||||
#Run Scope Machine funtion
|
||||
#Run Scope Machine function
|
||||
Add-ScopeMachine
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -13,7 +13,7 @@ $null = cmd /c ''
|
|||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
$Script:ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
#Log initialisation
|
||||
#Log initialization
|
||||
$LogFile = "$WorkingDir\logs\updates.log"
|
||||
|
||||
#Check if running account is system or interactive logon
|
||||
|
@ -109,14 +109,14 @@ if ($IsSystem) {
|
|||
#LogRotation if System
|
||||
$LogRotate = Invoke-LogRotation $LogFile $MaxLogFiles $MaxLogSize
|
||||
if ($LogRotate -eq $False) {
|
||||
Write-ToLog "An Exception occured during Log Rotation..."
|
||||
Write-ToLog "An Exception occurred during Log Rotation..."
|
||||
}
|
||||
|
||||
#Run post update actions if necessary if run as System
|
||||
if (!($WAUConfig.WAU_PostUpdateActions -eq 0)) {
|
||||
Invoke-PostUpdateActions
|
||||
}
|
||||
#Run Scope Machine funtion if run as System
|
||||
#Run Scope Machine function if run as System
|
||||
Add-ScopeMachine
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ if (Test-Network) {
|
|||
Write-ToLog "No explorer process found / Nobody interactively logged on..."
|
||||
}
|
||||
Else {
|
||||
#Get Winget system apps to excape them befor running user context
|
||||
#Get Winget system apps to escape them before running user context
|
||||
Write-ToLog "User logged on, get a list of installed Winget apps in System context..."
|
||||
Get-WingetSystemApps
|
||||
|
||||
|
|
Loading…
Reference in New Issue