chore: update chocolatey install files

This commit is contained in:
xeruf 2023-03-06 00:44:57 +01:00
parent a4f3fa9dab
commit be524472a9
5 changed files with 42 additions and 4 deletions

View File

@ -1,3 +1,4 @@
winaudit
hwininfo
windirstat
ultradefrag

26
issues.md Normal file
View File

@ -0,0 +1,26 @@
https://superuser.com/questions/55809/how-to-run-program-from-command-line-with-elevated-rights
- auto-elevation of choco
- post-choco-install check if launching git bash works
- add choco to handlers
Set-Location : Illegales Zeichen im Pfad.
In K:\instalee\packages\chocolatey\powershell.ps1:24 Zeichen:5
+ Set-Location $Loc.Substring(1,$Loc.Length-1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (K:\instalee":String) [Set-Location], ArgumentException
+ FullyQualifiedErrorId : ItemExistsArgumentError,Microsoft.PowerShell.Commands.SetLocationCommand
Set-Location : Der Pfad "K:\instalee"" kann nicht gefunden werden, da er nicht vorhanden ist.
In K:\instalee\packages\chocolatey\powershell.ps1:24 Zeichen:5
+ Set-Location $Loc.Substring(1,$Loc.Length-1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (K:\instalee":String) [Set-Location], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
https://stackoverflow.com/questions/52223872/get-windows-version-from-git-bash
# Windows 7
https://dotnet.microsoft.com/en-us/download/dotnet-framework
-> Unsupported Versions: 4.5

Binary file not shown.

View File

@ -126,9 +126,19 @@ $ChocoInstallPath = "$($env:SystemDrive)\ProgramData\Chocolatey\bin"
# Idempotence - do not install Chocolatey if it is already installed
if (!(Test-Path $ChocoInstallPath)) {
# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# TODO If offline:
#Install-ChocolateyFromPackage 'chocolatey.0.11.2.nupkg'
try {
# Set TLS 1.2 (3072) as that is the minimum required by Chocolatey.org
# Use integers because the enumeration value for TLS 1.2 won't exist
# in .NET 4.0, even though they are addressable if .NET 4.5+ is
# installed (.NET 4.5 is an in-place upgrade).
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
} catch {
Write-Warning 'Unable to set PowerShell to use TLS 1.2. This is required for contacting Chocolatey as of 03 FEB 2020. https://blog.chocolatey.org/2020/01/remove-support-for-old-tls-versions/. If you see underlying connection closed or trust errors, you may need to do one or more of the following: (1) upgrade to .NET Framework 4.5+ and PowerShell v3+, (2) Call [System.Net.ServicePointManager]::SecurityProtocol = 3072; in PowerShell prior to attempting installation, (3) specify internal Chocolatey package location (set $env:chocolateyDownloadUrl prior to install or host the package internally), (4) use the Download + PowerShell method of install. See https://docs.chocolatey.org/en-us/choco/installation for all install options.'
# https://docs.chocolatey.org/en-us/choco/setup#completely-offline-install
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
Install-ChocolateyFromPackage $scriptPath\chocolatey*.nupkg
}
}
choco feature enable -n allowGlobalConfirmation
choco upgrade all

View File

@ -0,0 +1 @@