# appliance-windows.ps1 - DEPRECATED. Its kiosk lockdown + autologon logic is now
# folded into install.ps1, which does the whole appliance setup (Defender
# exclusion, pre-placed ffmpeg, current-user lockdown, and autostart) in one
# elevated pass. The default path no longer creates a separate Windows account.
#
# This forwarder keeps existing links/muscle-memory working for one release cycle
# by handing off to install.ps1 with the same -KioskUser. It will be removed next
# cycle. Prefer double-clicking install-appliance.cmd, or running install.ps1.
[CmdletBinding()]
param(
  [string]$KioskUser = "KrakenKiosk"
)

Write-Warning "appliance-windows.ps1 is deprecated - forwarding to install.ps1 (which now does the full appliance setup). Update your scripts/links to call install-appliance.cmd or install.ps1."

$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$installPs1 = Join-Path $here "install.ps1"
if (-not (Test-Path $installPs1)) {
  Write-Error "install.ps1 not found next to this script ($installPs1)."
  exit 1
}

& powershell -NoProfile -ExecutionPolicy Bypass -File $installPs1 -KioskUser $KioskUser
exit $LASTEXITCODE
