Skip to content
Snippets Groups Projects
Commit d031757e authored by Andreas Lindemark's avatar Andreas Lindemark
Browse files

Modified the one-line installer

parent dbe3f5c2
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@ This one-liner download and install does the following:
3. To run the script, you need to temporarily change the PowerShell execution policy to allow script execution. You can do this by using the following one-liner code:
```powershell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force; $tempPath = [System.IO.Path]::Combine([System.Environment]::GetFolderPath('Desktop')); $script1 = "$tempPath\ChocolateyUpgrade.ps1"; $script2 = "$tempPath\InstallConfigureChocolatey.ps1"; $script3 = "$tempPath\ScheduleChocolateyUpgrade.ps1"; $configFile = "$tempPath\config.json"; Invoke-WebRequest -Uri "https://gitlab.liu.se/andli86/snippets/-/raw/master/Windows/Chocolatey/ChocolateyUpgrade.ps1" -OutFile $script1; Invoke-WebRequest -Uri "https://gitlab.liu.se/andli86/snippets/-/raw/master/Windows/Chocolatey/InstallConfigureChocolatey.ps1" -OutFile $script2; Invoke-WebRequest -Uri "https://gitlab.liu.se/andli86/snippets/-/raw/master/Windows/Chocolatey/ScheduleChocolateyUpgrade.ps1" -OutFile $script3; & $script2; $script3; Remove-Item -Path $script1, $script2 $script3 -Force; Write-Output "Check the log file at C:\Install Logs\*.log"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force; $tempPath = [System.IO.Path]::Combine([System.Environment]::GetFolderPath('Desktop')); $script1 = "$tempPath\ChocolateyUpgrade.ps1"; $script2 = "$tempPath\InstallConfigureChocolatey.ps1"; $script3 = "$tempPath\ScheduleChocolateyUpgrade.ps1"; $configFile = "$tempPath\config.json"; Invoke-WebRequest -Uri "https://gitlab.liu.se/andli86/snippets/-/raw/master/Windows/Chocolatey/ChocolateyUpgrade.ps1" -OutFile $script1; Invoke-WebRequest -Uri "https://gitlab.liu.se/andli86/snippets/-/raw/master/Windows/Chocolatey/InstallConfigureChocolatey.ps1" -OutFile $script2; Invoke-WebRequest -Uri "https://gitlab.liu.se/andli86/snippets/-/raw/master/Windows/Chocolatey/ScheduleChocolateyUpgrade.ps1" -OutFile $script3; & $script2; & $script3; Remove-Item -Path $script1, $script2, $script3 -Force; Write-Output "Check the log file at C:\Install Logs\*.log"
```
4. The config.json file with all your own settings, is not removed so you can save and reuse it on other Windows machines.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment