mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-23 07:09:07 +07:00
Overwrite existing PHP on windows
This commit is contained in:
@ -30,12 +30,7 @@ if($installed -ne $version) {
|
|||||||
if($version -lt '7.0') {
|
if($version -lt '7.0') {
|
||||||
Install-Module -Name VcRedist -Force
|
Install-Module -Name VcRedist -Force
|
||||||
}
|
}
|
||||||
Uninstall-Php C:\tools\php
|
Install-Php -Version $version -Architecture x86 -ThreadSafe $true -InstallVC -Path C:\tools\php -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
|
||||||
Install-Php -Version $version -Architecture x86 -ThreadSafe $true -InstallVC -Path C:\tools\php$version -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
|
|
||||||
(Get-PhpSwitcher).targets
|
|
||||||
Initialize-PhpSwitcher -Alias C:\tools\php -Scope CurrentUser -Force
|
|
||||||
Add-PhpToSwitcher -Name $version -Path C:\tools\php$version -Force
|
|
||||||
Switch-Php $version -Force
|
|
||||||
$status = "Installed PHP$version"
|
$status = "Installed PHP$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user