Benutzer-Werkzeuge

Webseiten-Werkzeuge


winget

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
winget [2022-12-18 03:08:48] – [Configuration] davidwinget [2023-01-09 14:01:22] (aktuell) – [Windows Server] david
Zeile 107: Zeile 107:
 Invoke-WebRequest -UseBasicParsing -Uri $wingetLicense -OutFile $wingetLicensePath Invoke-WebRequest -UseBasicParsing -Uri $wingetLicense -OutFile $wingetLicensePath
 Add-AppxPackage -Path $wingetPath Add-AppxPackage -Path $wingetPath
- 
-# the following is NOT WORKING sadly 
-return 
- 
-# App Execution Alias workaround for windows server versions older than 2022 
-if ($info.WindowsVersion -lt 2009) { 
-    $isDeveloperMode = $false 
-    $keyDeveloperMode = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" 
-    $valueDeveloperMode = "AllowDevelopmentWithoutDevLicense" 
-    $isDeveloperMode = 1 -eq (Get-ItemProperty -LiteralPath $keyDeveloperMode -Name $valueDeveloperMode -ErrorAction SilentlyContinue | Select-Object -ExpandProperty AllowDevelopmentWithoutDevLicense) 
-     
- 
-    $installLocation = Get-AppxPackage Microsoft.DesktopAppInstaller | Select-Object -ExpandProperty InstallLocation 
-    $symlinkValue = "$installLocation/winget.exe" 
-    $symlinkPath = "$env:USERPROFILE/AppData/Local/Microsoft/WindowsApps/winget.exe" 
-    $symlink = "New-Item -ItemType SymbolicLink -Value '$symlinkValue' -Path '$symlinkPath' -Force" 
- 
-    if ($isDeveloperMode) { 
-        Invoke-Expression $symlink 
-    } 
-    else { 
-        if ($IsCoreCLR) { 
-            $pwsh = "pwsh" 
-        } 
-        else { 
-            $pwsh = "powershell" 
-        } 
-  
-        Start-Process $pwsh -Verb RunAs -ArgumentList "-NoLogo -NoProfile -Command $symlink" -WindowStyle Hidden 
-  
-        if (Test-Path -PathType Leaf -LiteralPath $symlinkPath) { 
-            Write-Host "SymbolicLink was successfully created!" 
-        } 
-        else { 
-            Write-Host "Couldn't create SymbolicLink with this command: `"$symlink`"" 
-        } 
-    } 
-} 
  
 </code> </code>
  
  
/home/http/wiki/data/attic/winget.1671332928.txt · Zuletzt geändert: von david