No exit, log text...
parent
a7c1e01dd6
commit
78d4534eb7
|
@ -277,8 +277,7 @@ if (Test-Network) {
|
||||||
$explorerprocesses = @(Get-WmiObject -Query "Select * FROM Win32_Process WHERE Name='explorer.exe'" -ErrorAction SilentlyContinue)
|
$explorerprocesses = @(Get-WmiObject -Query "Select * FROM Win32_Process WHERE Name='explorer.exe'" -ErrorAction SilentlyContinue)
|
||||||
If ($explorerprocesses.Count -eq 0)
|
If ($explorerprocesses.Count -eq 0)
|
||||||
{
|
{
|
||||||
Write-Log "No explorer process found / Nobody interactively logged on.. ..exiting"
|
Write-Log "No explorer process found / Nobody interactively logged on..."
|
||||||
Exit 0
|
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
|
@ -296,7 +295,7 @@ if (Test-Network) {
|
||||||
Exit 0
|
Exit 0
|
||||||
}
|
}
|
||||||
elseif (!$UserScheduledTask){
|
elseif (!$UserScheduledTask){
|
||||||
Write-Log "User context execution not installed"
|
Write-Log "User context execution not installed..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,6 +303,7 @@ if (Test-Network) {
|
||||||
else {
|
else {
|
||||||
Write-Log "Critical: Winget not installed or detected, exiting..." "red"
|
Write-Log "Critical: Winget not installed or detected, exiting..." "red"
|
||||||
New-Item "$WorkingDir\logs\error.txt" -Value "Winget not installed or detected" -Force
|
New-Item "$WorkingDir\logs\error.txt" -Value "Winget not installed or detected" -Force
|
||||||
|
Write-Log "End of process!" "Cyan"
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue