| 1 | # Runs once as the new, non-elevated Cage workbench user. The administrator |
| 2 | # already provisioned the verified MSIX machine-wide; finishing registration |
| 3 | # here makes Windows consider it usable in this particular user session. |
| 4 | [CmdletBinding()] |
| 5 | param([Parameter(Mandatory)][string]$BundleDirectory,[Parameter(Mandatory)][string]$BridgeDirectory) |
| 6 | $ErrorActionPreference='Stop' |
| 7 | $user=[Security.Principal.WindowsIdentity]::GetCurrent() |
| 8 | if ([Security.Principal.WindowsPrincipal]::new($user).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { throw 'Run as the dedicated standard guest user.' } |
| 9 | Add-AppxPackage -RegisterByFamilyName -MainPackage 'Claude_pzs8sxrjxfjjc' -ErrorAction Stop |
| 10 | & (Join-Path $PSScriptRoot 'install-cli.ps1') -BundleDirectory $BundleDirectory -BridgeDirectory $BridgeDirectory -WorkbenchSetup |