diff --git a/install.ps1 b/install.ps1 index d18e81fa..b3e17845 100644 --- a/install.ps1 +++ b/install.ps1 @@ -472,7 +472,8 @@ function Install-MSI { } $quietParam = "/qn" - $arguments = "/i `"$MsiPath`" $quietParam /norestart /log `"$LogPath`" ALLUSERS=1 $installDirParam" + $allusersParam = if (Test-Administrator) { "ALLUSERS=1" } else { "ALLUSERS=0" } + $arguments = "/i `"$MsiPath`" $quietParam /norestart /log `"$LogPath`" $allusersParam $installDirParam" Write-Step "MSI command: msiexec.exe $arguments" $process = Start-Process -FilePath "msiexec.exe" -ArgumentList $arguments -Wait -PassThru