From d031757ef3797e7f4a9e6cc1b44c29246e91aab1 Mon Sep 17 00:00:00 2001 From: Andreas Lindemark <andreas.lindemark@liu.se> Date: Mon, 10 Mar 2025 17:21:39 +0100 Subject: [PATCH] Modified the one-line installer --- Windows/Chocolatey/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows/Chocolatey/README.md b/Windows/Chocolatey/README.md index c45a42c..6c49d5c 100644 --- a/Windows/Chocolatey/README.md +++ b/Windows/Chocolatey/README.md @@ -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. -- GitLab