fix(kiosk): WESL DefaultAction is sint32 not uint32 (2nd e2e finding) #8
@@ -45,10 +45,10 @@ $sid=(New-Object System.Security.Principal.NTAccount($BootstrapUser)).Translate(
|
||||
try {
|
||||
Invoke-CimMethod -Namespace $cls -ClassName WESL_UserSetting -MethodName SetEnabled -Arguments @{Enabled=$true} | Out-Null
|
||||
# Default shell = Explorer for everyone else (incl. OOBE) — critical so non-kiosk logons don't break.
|
||||
Invoke-CimMethod -Namespace $cls -ClassName WESL_UserSetting -MethodName SetDefaultShell -Arguments @{Shell='explorer.exe';DefaultAction=[uint32]0} | Out-Null
|
||||
Invoke-CimMethod -Namespace $cls -ClassName WESL_UserSetting -MethodName SetDefaultShell -Arguments @{Shell='explorer.exe';DefaultAction=[int32]0} | Out-Null
|
||||
# sm-bootstrap => the elevating launcher; on exit, restart the shell (action 0).
|
||||
Invoke-CimMethod -Namespace $cls -ClassName WESL_UserSetting -MethodName SetCustomShell -Arguments @{
|
||||
Sid=$sid; Shell="cmd.exe /c `"$launcher`""; DefaultAction=[uint32]0 } | Out-Null
|
||||
Sid=$sid; Shell="cmd.exe /c `"$launcher`""; DefaultAction=[int32]0 } | Out-Null
|
||||
$set=Invoke-CimMethod -Namespace $cls -ClassName WESL_UserSetting -MethodName GetCustomShell -Arguments @{Sid=$sid} -ErrorAction SilentlyContinue
|
||||
if (-not $set -or [string]::IsNullOrEmpty($set.Shell)) { throw "custom shell did not take for $BootstrapUser" }
|
||||
Log "shell launcher configured for sm-bootstrap (shell=$($set.Shell))"
|
||||
|
||||
Reference in New Issue
Block a user