From 8c0bec48836d27dc75fdd4e3f5ef5e32ad347e94 Mon Sep 17 00:00:00 2001 From: Alexander Krasnukhin Date: Thu, 30 Jun 2016 16:57:19 +0200 Subject: [PATCH] Change temporary directory for exectutable to C:\Windows\Temp Yep, $env:temp is even better but lets change things step by step. This makes script inconsistent as other parts still use c:\tmp for storing configuraiton files. I don't want to change them as it is *very* likely users upload configuraiton files there already using external scripts. --- bootstrap-salt.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index 984eebe..2f51d23 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -221,7 +221,7 @@ $saltExe = "Salt-Minion-$version-$arch-Setup.exe" Write-Output "Downloading Salt minion installer $saltExe" $webclient = New-Object System.Net.WebClient $url = "$repourl/$saltExe" -$file = "C:\tmp\$saltExe" +$file = "C:\Windows\Temp\$saltExe" $webclient.DownloadFile($url, $file) #=============================================================================== @@ -241,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\$saltExe -ArgumentList "/S $parameters" -Wait -NoNewWindow -PassThru | Out-Null +Start-Process C:\Windows\Temp\$saltExe -ArgumentList "/S $parameters" -Wait -NoNewWindow -PassThru | Out-Null #=============================================================================== # Configure the minion service