diff --git a/installer.ps1 b/installer.ps1 index 9dac2e2..003df79 100644 --- a/installer.ps1 +++ b/installer.ps1 @@ -61,7 +61,9 @@ if (!(Test-Path -Path "$env:SYSTEMDRIVE\svrjs\svrjs")) { } # Download SVR.JS zip archive +$manuallyInstalled = $False if ($installType -eq "manual") { + $manuallyInstalled = $True $svrjsZipArchive = Read-Host "Path to SVR.JS zip archive" } elseif ($INSTALLTYPE -eq "stable") { $svrjsVersion = (Invoke-RestMethod -Uri "https://downloads.svrjs.org/latest.svrjs").Trim() @@ -127,7 +129,9 @@ Remove-Item -Path $nodejsZipArchive # Extract SVR.JS files Write-Host "Extracting SVR.JS files..." Expand-Archive -Path $svrjsZipArchive -DestinationPath "$env:SYSTEMDRIVE\svrjs\svrjs" -Force -Remove-Item -Path $svrjsZipArchive +if (!($manuallyInstalled)) { + Remove-Item -Path $svrjsZipArchive +} if (Test-Path -Path "$env:SYSTEMDRIVE\svrjs\svrjs\svr.compressed" -PathType "Leaf") { Push-Location Set-Location -Path "$env:SYSTEMDRIVE\svrjs\svrjs"