From a124f33631a4c77fad072c2a6eba233cdf4f1a1c Mon Sep 17 00:00:00 2001 From: Alexander Krasnukhin Date: Tue, 24 May 2016 20:46:27 +0200 Subject: [PATCH] Keep original name of salt executable executable It is a good idea to not rename anything and keep the original name. Renaming to salt.exe we loose version and arch information. --- bootstrap-salt.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index 2bff69e..984eebe 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -217,10 +217,11 @@ If (!$version) { #=============================================================================== # Download minion setup file #=============================================================================== -Write-Output "Downloading Salt minion installer Salt-Minion-$version-$arch-Setup.exe" +$saltExe = "Salt-Minion-$version-$arch-Setup.exe" +Write-Output "Downloading Salt minion installer $saltExe" $webclient = New-Object System.Net.WebClient -$url = "$repourl/Salt-Minion-$version-$arch-Setup.exe" -$file = "C:\tmp\salt.exe" +$url = "$repourl/$saltExe" +$file = "C:\tmp\$saltExe" $webclient.DownloadFile($url, $file) #=============================================================================== @@ -240,7 +241,7 @@ If($runservice -eq $false) {$parameters = "$parameters /start-service=0"} #=============================================================================== #Wait for process to exit before continuing. Write-Output "Installing Salt minion" -Start-Process C:\tmp\salt.exe -ArgumentList "/S $parameters" -Wait -NoNewWindow -PassThru | Out-Null +Start-Process C:\tmp\$saltExe -ArgumentList "/S $parameters" -Wait -NoNewWindow -PassThru | Out-Null #=============================================================================== # Configure the minion service