# Guest2Go Kiosk - one-line installer # Run in PowerShell: irm https://login.guest2go.com/install.ps1 | iex $ErrorActionPreference = 'Stop' $InstallerUrl = 'https://login.guest2go.com/kiosk-update/Guest2Go_Kiosk_Setup.exe' $VersionUrl = 'https://login.guest2go.com/kiosk-update/version.txt' $SelfUrl = 'https://login.guest2go.com/install.ps1' function Test-IsAdmin { $id = [Security.Principal.WindowsIdentity]::GetCurrent() (New-Object Security.Principal.WindowsPrincipal($id)).IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator) } # The installer sets a Windows service + machine policies, so it needs admin. # If we're not elevated, relaunch this same one-liner in an elevated window. if (-not (Test-IsAdmin)) { Write-Host "Guest2Go installer needs Administrator rights - opening an elevated window..." -ForegroundColor Yellow Start-Process powershell -Verb RunAs -ArgumentList @( '-NoProfile','-NoExit','-ExecutionPolicy','Bypass','-Command', "irm $SelfUrl | iex") return } Write-Host "" Write-Host " Guest2Go Kiosk installer" -ForegroundColor Cyan Write-Host " ------------------------" # Always installs the newest build (the installer URL is overwritten each release). # version.txt just tells us which version that is, so this line is never out of date. try { $ver = (Invoke-WebRequest -Uri $VersionUrl -UseBasicParsing).Content.Trim() } catch { $ver = $null } Write-Host " Installing version: $(if ($ver) { "v$ver" } else { 'latest' })" -ForegroundColor Gray $dst = Join-Path $env:TEMP 'Guest2Go_Kiosk_Setup.exe' try { Write-Host " Downloading installer..." -ForegroundColor Gray Invoke-WebRequest -Uri $InstallerUrl -OutFile $dst -UseBasicParsing Unblock-File -Path $dst -ErrorAction SilentlyContinue # strip Mark-of-the-Web so SmartScreen won't block the silent run $mb = [math]::Round((Get-Item $dst).Length / 1MB, 1) Write-Host " Downloaded ($mb MB). Installing - this takes a minute..." -ForegroundColor Gray $p = Start-Process -FilePath $dst -ArgumentList '/VERYSILENT','/NORESTART','/SUPPRESSMSGBOXES' -Wait -PassThru Write-Host "" if ($p.ExitCode -eq 0) { Write-Host " [OK] Guest2Go kiosk installed and running." -ForegroundColor Green Write-Host " It will appear in your portal (login.guest2go.com) within a minute." -ForegroundColor Gray Write-Host " Then assign it to the hotel and fill 'Your Hotel' from their application." -ForegroundColor Gray } else { Write-Host " [!] Installer exited with code $($p.ExitCode). Try re-running, or install the .exe manually." -ForegroundColor Red } } catch { Write-Host " [!] Install failed: $($_.Exception.Message)" -ForegroundColor Red } finally { Remove-Item $dst -ErrorAction SilentlyContinue }