Update install-webplatform.ps1

This commit is contained in:
FusionPBX
2018-01-03 03:29:44 -07:00
committed by GitHub
parent 3571e7b450
commit 48165a244b

View File

@@ -6,7 +6,6 @@ Function Install-WebPlatform() {
#send message #send message
if (Get-Installed-App "*Web Platform*") { if (Get-Installed-App "*Web Platform*") {
Write-Host "Web Platform Installer is already installed" Write-Host "Web Platform Installer is already installed"
return
} }
#download and install the web platform installer #download and install the web platform installer
@@ -16,7 +15,7 @@ Function Install-WebPlatform() {
Start-Process $filename -Wait Start-Process $filename -Wait
} }
else { else {
Start-Process "C:\Program Files\Microsoft\Web Platform Installer\WebPlatformInstaller.exe" -Wait #Start-Process "C:\Program Files\Microsoft\Web Platform Installer\WebPlatformInstaller.exe /silent" -Wait
} }
# list available applications - All, Available # list available applications - All, Available
@@ -26,12 +25,12 @@ Function Install-WebPlatform() {
if (-not (Test-Path "${env:ProgramFiles}\PHP\v7.1\php.exe")) { if (-not (Test-Path "${env:ProgramFiles}\PHP\v7.1\php.exe")) {
$cpu = Get-CPU $cpu = Get-CPU
if ($cpu -eq "x86") { if ($cpu -eq "x86") {
$command = "WebpiCmd.exe /install /Products:PHP71 /AcceptEula" ."C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd-x64.exe" "/install" "/Products:PHP71" "/AcceptEula"
} }
else { else {
$command = "WebpiCmd-x64.exe /install /Products:PHP71x64 /AcceptEula" ."C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd-x64.exe" "/install" "/Products:PHP71x64" "/AcceptEula"
} }
Start-Process $command -Wait
} }
} }
#Install-WebPlatform