Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smileys
:) ;) :smile: :lol: :hihi: :D :rofl: :muahah: :( :pff: :kopfstreichel: :ohno: :betruebt: :heulen: :kopfkratz: :duckundweg: :o :? :oops: :psst: :sauer: :-P :daumenrunter: :daumen: :dankeschoen: :thx: :dafür: :gähn:
Mehr Smileys anzeigen

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smileys sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Ansicht erweitern Die letzten Beiträge des Themas: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 05.05.2024, 17:04

Die oben genannten Methoden, um bei einer Windows Installation Winget nachzuinstallieren (falls nicht schon vorhanden) haben einen gemeinsamen Nachteil:
die Abhängigkeiten sind fest verankert (z.B. UI-XAML 2.7 bzw. 2.8) und destawegen nicht immer auf dem neuesten Stand.
Deshalb hier noch eine neue Version, die auf dem Script hier: https://github.com/asheroto/winget-install aufbaut.
getestet von mir in einer Windows Sandbox.
Als nächstes werde ich mal schauen, ob das auch in einer SetupComplete.cmd (Firstlogon.cmd) funktioniert.
Nacheinander die folgenden Befehle in die Kommandozeile (cmd) (Adminrechte) hämmern:

Code: Alles auswählen

powershell Install-PackageProvider -Name "NuGet" -Force
powershell Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
powershell Install-Script -Name winget-install -force
PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File """C:\Program Files\WindowsPowerShell\Scripts\winget-install.ps1""' -Verb RunAs}"
Bei der letzten Zeile bin ich mir nicht sicher, ob das nicht auch einfacher geht. Leider fehlen mir die Powershell-Kenntnisse, um das zu kürzen (wenn es denn überhaupt kürzer geht).
Vlt. kann jemand, der hier mitliest (@DK2000, @g-force?) da drauf eingehen und es umschreiben?
Apropo:
das Zeilen funktionieren zwar auch so; aber an welcher Stelle müßte man die möglichen Schalter zu dem Script "winget-install.ps1" in die letzte Zeile einfügen?
es gibt z.B. diese Schalter:
-Debug
Enables debug mode, which shows additional information for debugging.
-Force
Ensures installation of winget and its dependencies, even if already present.
-ForceClose
Relaunches the script in conhost.exe and automatically ends active processes associated with winget that could interfere with the installation.
-Wait
Forces the script to wait several seconds before exiting.
-UpdateSelf
Updates the script to the latest version on PSGallery.
-CheckForUpdate
Checks if there is an update available for the script.
-Version
Displays the version of the script.
-Help
Displays the full help information for the script

Wenn alle Befehle abgesetzt sind, dann sollte

Code: Alles auswählen

winget list --accept-source-agreements
funktionieren.

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 25.01.2024, 18:50

DK2000 hat geschrieben: 25.01.2024, 18:45 Ja, aber in so eine Falle pflege ich da die Konfigurationsdateien einzeln und packe die in ein Repository. Von da aus kopiere ich die dann manuell oder per cmd/ps1 an ihr Ziel.
mach in normalerweise auch so.
Diese Batch sollte für User sein, die noch gar kein Winget und infolgedessen auch noch keine settings.json haben.

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von DK2000 » 25.01.2024, 18:45

Ja, aber in so eine Falle pflege ich da die Konfigurationsdateien einzeln und packe die in ein Repository. Von da aus kopiere ich die dann manuell oder per cmd/ps1 an ihr Ziel. Die ganzen Dateien als Batch mit Echo neu erstellen, wäre mir da viel zu viel Aufwand.

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 25.01.2024, 18:30

DK2000 hat geschrieben: 25.01.2024, 17:55 Die Settings.json könnte man ja auch so bearbeiten.
Das in einen Batch zu packen, wäre mir da zu kompliziert.
Weißt ja; bei mir muss immer alles automatisiert ablaufen ;)

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von DK2000 » 25.01.2024, 17:55

Die Settings.json könnte man ja auch so bearbeiten. Meine sieht da auch ganz anders mittlerweile aus:

Code: Alles auswählen

{
  "$schema": "https://aka.ms/winget-settings.schema.json",
  "visual": {
    "progressBar": "rainbow",
    "anonymizeDisplayedPaths": true
  },
  "source": {
    "autoUpdateIntervalInMinutes": 120
  },
  "network": {
    "downloader": "do",
    "doProgressTimeoutInSeconds": 60
  },
  "installBehavior": {
    "portablePackageUserRoot": "C:/Users/*****/AppData/Local/Programs/winget",
    "portablePackageMachineRoot": "C:/Program Files/winget",
    "disableInstallNotes": true,
    "preferences": {
      "locale": [
        "de-DE",
        "en-US"
      ],
      "architectures": [
        "x64",
        "x86"
      ]
    }
  },
  "uninstallBehavior": {
    "purgePortablePackage": true
  },
  "telemetry": {
    "disable": true
  },
  "logging": {
    "level": "info"
  }
}
Das in einen Batch zu packen, wäre mir da zu kompliziert.

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 25.01.2024, 17:46

vlt. möchte jemand auch gleich die Settings.json von Winget bearbeiten lassen? Voila!
Der Forschrittsbalken (z.B.) wird dadurch auf "Rainbow" umgestellt. :smile:

Code: Alles auswählen

@ECHO OFF
::2024-02-06
set /a _Debug=0
chcp 1252 >nul 
::================================================================================================
:: Run Script as Administrator

set _Args=%*
if "%~1" NEQ "" (
  set _Args=%_Args:"=%
)
fltmc >nul || (
  cd /d "%~dp0"
  cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~dpnx0"" ""%_Args%""", "", "runas", 1 > "%temp%\GetAdmin.vbs"
  "%temp%\GetAdmin.vbs"
  del /f /q "%temp%\GetAdmin.vbs" 1>nul 2>nul
  exit
)

::================================================================================================


powershell -command "$ProgressPreference = 'SilentlyContinue' ; write-host "Downloade und installiere Abhängigkeiten" ; Invoke-WebRequest -Uri  https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile .\Microsoft.VCLibs.x64.14.00.Desktop.appx ; Invoke-WebRequest -Uri  https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3 -OutFile .\microsoft.ui.xaml.2.7.3.nupkg.zip ; Expand-Archive -Path .\microsoft.ui.xaml.2.7.3.nupkg.zip -Force ; Add-AppXPackage -Path .\microsoft.ui.xaml.2.7.3.nupkg\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx; Add-AppXPackage -Path .\Microsoft.VCLibs.x64.14.00.Desktop.appx ; write-host "Installiere Winget" ;  Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.6.3482/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle ; Add-AppXPackage -Path .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle" 2> nul

@SHIFT /0

CLS

echo ======================
echo konfiguriere Settings
echo ====================== & echo.

del "%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json" /f /q

SET NEWLINE=^& echo.
@Echo off

ECHO %NEWLINE%^{>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^ "$schema": "https://aka.ms/winget-settings.schema.json",>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^   // For documentation on these settings, see: https://aka.ms/winget-settings>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json  
ECHO %NEWLINE%^ "source": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^ "autoUpdateIntervalInMinutes": 5 >>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^ },>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
 
ECHO %NEWLINE%^ "visual": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "progressBar": "rainbow">>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^},>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 

ECHO %NEWLINE%^ "experimentalFeatures": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "uninstall": true,>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "upgrade": true,>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "list": true,>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "experimentalMSStore": true>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^  },>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
 
ECHO %NEWLINE%^ "telemetry": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "disable": true>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^},>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 

ECHO %NEWLINE%^ "installBehavior": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "preferences": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^        "locale": [ "de-DE", "en-US" ]>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    }>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^},>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
 
ECHO %NEWLINE%^ "installBehavior": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    "preferences": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^        "scope": "user">>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^    }>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^}>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 
ECHO %NEWLINE%^}>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 

cls

ECHO.
ECHO  - fertisch!!
ECHO.
rem timeout -1
winget list --accept-source-agreements
pause

@EXIT

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 25.01.2024, 15:18

hier noch mal ein "Einzeilen-Shorty". Hab ich irgendwo aus dem Internet.

Code: Alles auswählen

@Echo off
echo ======================
echo Installiere Winget
echo ====================== & echo.

powershell -command "$ProgressPreference = 'SilentlyContinue' ; write-host "Downloade und installiere Abhängigkeiten" ; Invoke-WebRequest -Uri  https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile .\Microsoft.VCLibs.x64.14.00.Desktop.appx ; Invoke-WebRequest -Uri  https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3 -OutFile .\microsoft.ui.xaml.2.7.3.nupkg.zip ; Expand-Archive -Path .\microsoft.ui.xaml.2.7.3.nupkg.zip -Force ; Add-AppXPackage -Path .\microsoft.ui.xaml.2.7.3.nupkg\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx; Add-AppXPackage -Path .\Microsoft.VCLibs.x64.14.00.Desktop.appx ; write-host "Installiere Winget" ;  Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.6.3482/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle ; Add-AppXPackage -Path .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle" 2> nul

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 26.07.2023, 20:06

von MS selbst gibt es ebenfalls noch eine elegante Methode:
https://learn.microsoft.com/de-de/windo ... er/winget/

Code: Alles auswählen

$progressPreference = 'silentlyContinue'
$latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object {$_.EndsWith(".msixbundle")}
$latestWingetMsixBundle = $latestWingetMsixBundleUri.Split("/")[-1]
Write-Information "Downloading winget to artifacts directory..."
Invoke-WebRequest -Uri $latestWingetMsixBundleUri -OutFile "./$latestWingetMsixBundle"
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.7.3/Microsoft.UI.Xaml.2.7.x64.appx -OutFile Microsoft.UI.Xaml.x64.appx
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage Microsoft.UI.Xaml.x64.appx
Add-AppxPackage $latestWingetMsixBundle
das Script wurde von mir noch etwas erweitert:
die Microsoft.UI.Xaml.2.7 kann ggf. erforderlich sein.
BTW: weiß jemand, ob es für die Microsoft.VCLibs.140.00_14.0.XXXXXX.0_x64_8wekyb3d8bbwe.Appx (also die ohne Desktop) ebenfalls eine statische Download Adresse gibt (so in der Art https://aka.ms/ .....)?

Gibt es eine Übersicht für https://aka.ms/ .....?

hier mal ein paar Beispiele:

Code: Alles auswählen

https://aka.ms/vs/17/release/vc_redist.x86.exe
https://aka.ms/vs/17/release/vc_redist.x64.exe

https://aka.ms/directx_x86_appx
https://aka.ms/directx_x64_appx

https://aka.ms/Microsoft.VCLibs.x86.14.00.Desktop.appx
https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx

https://aka.ms/Microsoft.VCLibs.arm64.14.00.Desktop.appx
https://aka.ms/Microsoft.VCLibs.arm.14.00.Desktop.appx

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 04.02.2023, 18:32

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von FatBoySlim » 04.02.2023, 18:08

Bild :sauer:

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von FatBoySlim » 04.02.2023, 18:05

Im Scrip aus dem netz ist ein Trojaner :sauer:

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 15.05.2022, 16:39

hier noch ein schönes Script, welches ich im Internet gefunden habe. Dies lädt einem die erforderlichen Dateien bei bestehender Internet-Verbindung selbständig herunter und installiert Winget.

Code: Alles auswählen

# WinGet Version Installation Scrip for Server 2019
# Work with Version 1.2.10271 or internal Version="1.17.10271.0"
# Or Bundle Version="2022.127.2322.0" 
# Andreas Nick 2022

Write-Host "Download and install winget" -ForegroundColor Yellow

if(!(Get-Module -ListAvailable -Name 'NTObjectManager')){
    Install-Module  'NTObjectManager' -scope CurrentUser -Force -Confirm:$false
    
} 

Import-Module  'NTObjectManager'

$Offline = $true 
$RepoPath = "$env:TEMP\WinGetTemp"
$BaseURL = 'https://www.microsoft.com/store/productId/9NBLGGH4NNS1'
$DownloadFiles = @( 'Microsoft.DesktopAppInstaller_2022.127.2322.0_neutral_~_8wekyb3d8bbwe.msixbundle',
                     'Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x64__8wekyb3d8bbwe.appx',
                     'Microsoft.UI.Xaml.2.7_7.2203.17001.0_x64__8wekyb3d8bbwe.appx')

# Version 1.2.10271 !!
$LicenseFileURL = 'https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/b0a0692da1034339b76dce1c298a1e42_License1.xml'

if(Test-Path $RepoPath   ) 
{
   #Remove-Item $RepoPath -Recurse 
} else {
    New-Item $RepoPath -ItemType Directory
}

function Get-AppXPackageURL {
[CmdletBinding()]
param (
  [string]$Uri,
  [string]$Filter = '.*' #Regex
)
   
  process {
    #$Uri=$StoreLink
    $WebResponse = Invoke-WebRequest -UseBasicParsing -Method 'POST' -Uri 'https://store.rg-adguard.net/api/GetFiles' -Body "type=url&url=$Uri&ring=Retail" -ContentType 'application/x-www-form-urlencoded'
    $result =$WebResponse.Links.outerHtml | Where-Object {($_ -like '*.appx*') -or ($_ -like '*.msix*')} | Where-Object {$_ -like '*_neutral_*' -or $_ -like "*_"+$env:PROCESSOR_ARCHITECTURE.Replace("AMD","X").Replace("IA","X")+"_*"} | ForEach-Object {
       $result = "" | Select-Object -Property filename, downloadurl
       if( $_ -match '(?<=rel="noreferrer">).+(?=</a>)' )
       {
         $result.filename = $matches.Values[0]
       }
       if( $_ -match '(?<=a href=").+(?=" r)' )
       {
         $result.downloadurl = $matches.Values[0]
       }
       $result
    } 
    $result | Where-Object -Property filename -Match $filter 
  }
}


#Download Winget 2022.127.2322.0 and Dependencies
$Packlist = @()
if(-not $Offline){
  $Packlist = @(Get-AppXPackageURL -Uri $BaseURL)
  #Download License file
  Invoke-WebRequest -Uri $LicenseFileURL -OutFile (Join-Path $RepoPath -ChildPath 'license.xml' )

  #Download package files
  foreach($item in $DownloadFiles)
  {
    if(-not (Test-Path (Join-Path $RepoPath  -ChildPath $item )))
    {
       $dlurl = [string]($Packlist | Where-Object -Property filename -match $item)[0].downloadurl
       Invoke-WebRequest -Uri  $dlurl -OutFile (Join-Path $RepoPath -ChildPath $item )
    } else 
    {
        Write-Information "The file $($item) already exist in the repo. Skip download"
    }
  }

}

#Install Winget without license
#Add-AppxPackage -Path $(Join-Path $RepoPath -ChildPath  $DownloadFiles[0]) -DependencyPath  $(Join-Path $RepoPath -ChildPath  $DownloadFiles[1]), $(Join-Path $RepoPath -ChildPath  $DownloadFiles[2]) 
#Get-AppxPackage Microsoft.DesktopAppInstaller | Remove-AppxPackage

#Install Winget with license
Add-AppxProvisionedPackage -PackagePath $(Join-Path $RepoPath -ChildPath  $DownloadFiles[0]) -LicensePath $(Join-Path $RepoPath -ChildPath 'license.xml') -online `
                           -DependencyPackagePath $(Join-Path $RepoPath -ChildPath  $DownloadFiles[1]), $(Join-Path $RepoPath -ChildPath  $DownloadFiles[2])  


# Here is the trick of Thorsten Butz. We create a rebase point ourselves
# The alias can be defined somewhere in the $Temp:Path. For example, in C:\Windows\System32
Set-ExecutionAlias -Path "$env:windir\winget.exe" -Target $((Get-AppxPackage *DesktopAppInstaller*).InstallLocation + '\winget.exe') -PackageName `
                  'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe' -AppType Desktop -EntryPoint 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget' -Version 3

#Get-ExecutionAlias  'c:\windows\winget.exe'
#Remove-Item  'c:\windows\winget.exe'
#'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe' 
pause

            
Quelle: https://www.appbot.de/113-winget-on-server-2019.html

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo) [gelöst]

von Holgi » 15.05.2022, 12:34

irgendwie hatte ich mit der alten Methode (oben) plötzlich keinen Erfolg mehr.
Deshalb hier noch mal mein derzeitiges Powershell Script. Funktioniert in einer Windows Sandbox. Jetzt braucht es plötzlich wieder die UI.XAML

Code: Alles auswählen

Add-AppxPackage "Microsoft.VCLibs.140.00_x64_8wekyb3d8bbwe.appx"
Add-AppxPackage "Microsoft.UI.Xaml_x64_8wekyb3d8bbwe.appx"
Add-AppxPackage "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"

Re: Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo)

von Holgi » 03.10.2021, 19:35

Danke DK2000! :dankeschoen:
Da wäre ich nie drauf gekommen.
Mußte das noch mal etwas abändern, weil in einer Windows Sandbox (wo es auch funzt) die "Microsoft.UI.Xaml.-Dateien" überflüssig waren (und sogar zu einer Fehlermeldung führten).
So sieht das dann aus (und funktioniert):

Code: Alles auswählen

Add-AppxPackage "C:\PS\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"`
-DependencyPath "C:\PS\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x64__8wekyb3d8bbwe.appx",`
                "C:\PS\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x86__8wekyb3d8bbwe.appx"
oder alternativ, wenn sich das Powershell-Script und die MSIXBundle- bzw. APPX-Dateien im gleichen Ordner befinden:

Code: Alles auswählen

Add-AppxPackage "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"`
-DependencyPath "Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x64__8wekyb3d8bbwe.appx",`
                "Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x86__8wekyb3d8bbwe.appx"

Nach oben