Benutzer-Werkzeuge

Webseiten-Werkzeuge


winget

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
winget [2022-07-13 11:49:09] – angelegt davidwinget [2023-01-09 14:01:22] (aktuell) – [Windows Server] david
Zeile 1: Zeile 1:
-====== Winget ======+====== Windows Package Manager (winget) ======
  
   * [[https://github.com/microsoft/winget-cli.git|Windows Package Manager (winget)]]: Windows Paketverwaltung (Idee die Microsoft von AppGet [[https://keivan.io/the-day-appget-died/|geklaut]] hat)   * [[https://github.com/microsoft/winget-cli.git|Windows Package Manager (winget)]]: Windows Paketverwaltung (Idee die Microsoft von AppGet [[https://keivan.io/the-day-appget-died/|geklaut]] hat)
Zeile 9: Zeile 9:
  
 ===== Configuration ===== ===== Configuration =====
 +
 +**Tab Completion in PowerShell**: [[https://docs.microsoft.com/windows/package-manager/winget/tab-completion]]
  
 Pfad zur Konfigurationsdatei: ''%%$env:localappdata/Packages/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe/LocalState/settings.json%%'' Pfad zur Konfigurationsdatei: ''%%$env:localappdata/Packages/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe/LocalState/settings.json%%''
Zeile 15: Zeile 17:
   > winget settings   > winget settings
  
-<code json settings.json>+<code javascript settings.json>
 { {
-    "$schema": "https://aka.ms/winget-settings.schema.json", +  "$schema": "https://aka.ms/winget-settings.schema.json", 
-    // For documentation on these settings, see: https://aka.ms/winget-settings +  // For documentation on these settings, see: https://aka.ms/winget-settings 
-    "experimentalFeatures":+  "experimentalFeatures":
-        "dependencies": true, +    "dependencies": true, 
-        "directMSI": true, +    "directMSI": true, 
-        "experimentalARG": true, +    "experimentalARG": true, 
-        "experimentalCMD": true+    "experimentalCMD": true
 +    "pinning": true 
 +  }, 
 +  "installBehavior":
 +    "disableInstallNotes": true, 
 +    "preferences":
 +      "locale":
 +        "en-US" 
 +      ], 
 +      "scope": "machine"
     },     },
-    "installBehavior":+    "requirements": {} 
-        "preferences":+  }, 
-            "locale":+  "interactivity": { 
-                "en-US" +    "disable": true 
-            ], +  }, 
-            "scope": "machine" +  "network":
-        }, +    "doProgressTimeoutInSeconds": 30, 
-        "requirements": {} +    "downloader": "wininet" 
-    }, +  }, 
-    "logging": { +  "source":
-        "level": "info" +    "autoUpdateIntervalInMinutes":
-    }, +  }, 
-    "network":+  "telemetry":
-        "doProgressTimeoutInSeconds": 30, +    "disable": true 
-        "downloader": "wininet" +  }, 
-    }, +  "visual":
-    "source":+    "progressBar": "accent" 
-        "autoUpdateIntervalInMinutes":+  }
-    }, +
-    "telemetry":+
-        "disable": true +
-    }, +
-    "visual":+
-        "progressBar": "accent" +
-    }+
 } }
 +
 +</code>
 +
 +
 +===== Installation =====
 +
 +
 +==== Windows Server ====
 +
 +  * Winget wird offiziell nicht auf Windows Server unterstützt.
 +  * Winget benötigt eigentlich "App Execution Aliases" und kann deshalb nur auf Windows Server 2022 oder neuer ohne Probleme installiert werden
 +  * Winget läuft nicht auf Windows Server Versionen, die älter sind als 2019 und kann mit einigen Workarounds auf 2019 lauffähig gemacht werden
 +
 +[[https://gist.github.com/masterflitzer/08622ffc98242cf6453fbfd4b8df1631]]
 +
 +<code powershell winget.ps1>
 +$ErrorActionPreference = 'Stop'
 +
 +$info = Get-ComputerInfo -Property @("WindowsInstallationType", "WindowsVersion")
 +if ($info.WindowsInstallationType -ne "Server") { 
 +    write-host "This script is only intended for use on Windows Server because installation of winget is not officially supported there!"
 +    return
 +}
 +
 +# Microsoft.UI.Xaml: https://www.nuget.org/packages/Microsoft.UI.Xaml
 +# Microsoft.VCLibs: https://docs.microsoft.com/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge#how-to-install-and-update-desktop-framework-packages
 +# WinGet: https://github.com/microsoft/winget-cli#manually-update
 +
 +# update links manually
 +
 +$msuixaml = "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.1"
 +$vclibs = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
 +$winget = "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
 +$wingetLicense = "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/b0a0692da1034339b76dce1c298a1e42_License1.xml"
 +
 +$msuixamlPath = "$env:tmp/microsoft.ui.xaml.zip"
 +$msuixamlPathExtracted = "$env:tmp/microsoft-ui-xaml"
 +$vclibsPath = "$env:tmp/Microsoft.VCLibs.Desktop.appx"
 +$wingetPath = "$env:tmp/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
 +$wingetLicensePath = "$env:tmp/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.license.xml"
 +
 +Invoke-WebRequest -UseBasicParsing -Uri $msuixaml -OutFile $msuixamlPath
 +Expand-Archive -LiteralPath $msuixamlPath -DestinationPath $msuixamlPathExtracted -Force
 +$msuixamlExtracted = Get-ChildItem -File -LiteralPath "$msuixamlPathExtracted/tools/AppX/x64/Release" | Where-Object { [regex]::Match($_.Extension, "^\.(appx|msix)(bundle)?$") } | Select-Object -ExpandProperty FullName -First 1
 +Add-AppxPackage -Path $msuixamlExtracted
 +
 +Invoke-WebRequest -UseBasicParsing -Uri $vclibs -OutFile $vclibsPath
 +Add-AppxPackage -Path $vclibsPath
 +
 +Invoke-WebRequest -UseBasicParsing -Uri $winget -OutFile $wingetPath
 +Invoke-WebRequest -UseBasicParsing -Uri $wingetLicense -OutFile $wingetLicensePath
 +Add-AppxPackage -Path $wingetPath
 +
 </code> </code>
  
  
/home/http/wiki/data/attic/winget.1657712949.txt · Zuletzt geändert: von david