Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/playbook/Executables/APPLYDUHIVE.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ foreach ($yamlFile in $yamlFiles) {
$parsedYaml = ConvertFrom-Yaml $yamlContent
foreach ($entry in $parsedYaml) {
foreach ($value in $entry.actions.path) {
if ($value -like 'HKCU') {
if ($value -like 'HKCU*') {
if (!$RegistryPaths.Contains($value.Substring(4))) { $RegistryPaths += $value.Substring(4) }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $safeModePackageList = "$sys32\safeModePackagesToInstall.atlasmodule"
$env:path = "$windir;$sys32;$sys32\Wbem;$sys32\WindowsPowerShell\v1.0;" + $env:path
$errorLevel = $warningLevel = 0

$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64')
$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') -or ($env:PROCESSOR_ARCHITEW6432 -eq 'ARM64')
$arch = if ($arm) {'arm64'} else {'amd64'}

$safeModeStatus = (Get-CimInstance -Class Win32_ComputerSystem).BootupState -ne 'Normal boot'
Expand Down Expand Up @@ -178,8 +178,8 @@ if ($UninstallPackages) {
Write-Host "[WARN] '$UninstallPackages' matched no installed packages, nothing to do." -ForegroundColor Yellow
$script:warningLevel++
} else {
if ($notMatchedPackages.Count -gt 0) {
Write-Host "[WARN] Some packages not found to uninstall: $notMatchedPackages" -ForegroundColor Yellow
if ($notInstalledPackages.Count -gt 0) {
Write-Host "[WARN] Some packages not found to uninstall: $notInstalledPackages" -ForegroundColor Yellow
$script:warningLevel++
}

Expand Down Expand Up @@ -297,7 +297,7 @@ function ProcessCab($cabPath) {
Write-Host "[INFO] Checking certificate..."
try {
$cert = (Get-AuthenticodeSignature $cabPath).SignerCertificate
if ($cert.Extensions.EnhancedKeyUsages.Value -ne "1.3.6.1.4.1.311.10.3.6") {
if ($cert.Extensions.EnhancedKeyUsages.Value -notcontains "1.3.6.1.4.1.311.10.3.6") {
Write-Host "[ERROR] Cert doesn't have proper key usages, can't continue." -ForegroundColor Red
$script:errorLevel++
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ foreach ($userKey in (Get-RegUserPaths -NoDefault).PsPath) {

Write-Output "Clearing current shortcuts..."
$taskBarAppData = "$appData\$taskBarLocation"
if (Test-Path $taskBarAppData -PathType Leaf) {
Write-Output "Deleting TaskBar file..."
Remove-Item -Path $taskBarAppData -Force
if (Test-Path $taskBarAppData) {
Remove-Item -Path "$taskBarAppData\*" -Force -Recurse
}
Get-ChildItem $taskBarAppData | Remove-Item -Force -Recurse

Write-Output "Adding new shortcuts..."
Copy-Item -Path "$tmp\*" -Destination $taskBarAppData -Force
Expand Down
2 changes: 1 addition & 1 deletion src/playbook/Executables/CLIENTCBS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Variables
$windir = [Environment]::GetFolderPath('Windows')
$settingsExtensions = (Get-ChildItem "$windir\SystemApps" -Recurse).FullName | Where-Object { $_ -like '*wsxpacks\Account\SettingsExtensions.json*' }
$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64')
$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') -or ($env:PROCESSOR_ARCHITEW6432 -eq 'ARM64')
if ($settingsExtensions.Count -eq 0) {
Write-Output "Settings extensions ($settingsExtensions) not found."
Write-Output "User is likely on Windows 10, nothing to do. Exiting..."
Expand Down
2 changes: 1 addition & 1 deletion src/playbook/Executables/SOFTWARE.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param (

$timeouts = @("--connect-timeout", "10", "--retry", "5", "--retry-delay", "0", "--retry-all-errors")
$msiArgs = "/qn /quiet /norestart ALLUSERS=1 REBOOT=ReallySuppress"
$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64')
$arm = ((Get-CimInstance -Class Win32_ComputerSystem).SystemType -match 'ARM64') -or ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') -or ($env:PROCESSOR_ARCHITEW6432 -eq 'ARM64')

# Create a temporary directory
function Remove-TempDirectory { Pop-Location; Remove-Item -Path $tempDir -Force -Recurse -EA 0 }
Expand Down
Loading