Skip to content

Installation Script Fails on Windows PowerShell 5.1 #2

@justavik

Description

@justavik

Bug Report: Installation Script Fails on Windows PowerShell 5.1

Environment

  • OS: Windows 10/11
  • PowerShell Version: 5.1 (Windows PowerShell - default Windows installation)
  • Running as Administrator: Yes

Expected Behavior

The installation script should work with both Windows PowerShell 5.1 (default) and PowerShell Core.

Actual Behavior

Script fails immediately with "[ERROR] This installer is for Windows only." when run in Windows PowerShell 5.1, despite being on Windows.

Root Cause

The script uses $IsWindows variable for OS detection, which only exists in PowerShell Core (6.0+). In Windows PowerShell 5.1, this variable is $null, causing the condition if (-not $IsWindows) to evaluate as true.

Steps to Reproduce

  1. Open Windows PowerShell 5.1 as Administrator (default PowerShell on Windows)
  2. Run: iex ((New-Object System.Net.WebClient).DownloadString('https://vapi.ai/install.ps1'))
  3. Script fails with Windows detection error

Workaround

Use PowerShell Core instead:

pwsh -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://vapi.ai/install.ps1'))"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions