Fix issues with domain accounts & fix run.bat breaking when launched from path with certain characters (#693)

This commit is contained in:
Jeffrey
2026-07-08 23:18:04 +02:00
committed by GitHub
parent 89a5d508d8
commit ce8c10042e
4 changed files with 643 additions and 53 deletions
+2 -1
View File
@@ -93,7 +93,8 @@ function Normalize-RegistryBackup {
}
elseif ($normalizedTarget -like 'CurrentUser:*') {
$targetCurrentUserName = $normalizedTarget.Substring(12)
if ([string]::IsNullOrWhiteSpace($targetCurrentUserName) -or ($targetCurrentUserName -ne $env:USERNAME)) {
if ([string]::IsNullOrWhiteSpace($targetCurrentUserName) -or
-not (Test-UserNameMatch -UserNameA $targetCurrentUserName -UserNameB $env:USERNAME)) {
$errors.Add("Backup was made for '$targetCurrentUserName', this does not match current user '$env:USERNAME'.")
}
}