ich versuche seit einigen Tagen appx Apps mittels Powershell zu installieren, jedoch bin ich bisher zu keinem positiven Ergebnis gekommen.
Installieren würde ich gerne den xodo PDF Reader, den es leider nur über den Microsoft Store gibt.
Ich habe mir die appx Datei besorgt und kann die App nun mittels powershell installieren.
Als Abhängigkeit möchte ich noch Microsoft.NET.Native.Framework.1.3.appx & Microsoft.NET.Native.Runtime.1.4.appx installieren, damit die App überhaupt lauffähig ist.
Ich habe nun mehrere Lösungsansätze probiert und folgenden Ansatz im Web gefunden (mittels Powershellcall).
Setup.ins:
Code: Alles auswählen
[actions]
requiredWinstVersion >= "4.11.4.3"
; opsi include file
include_append "section_sub_check_exitcode.opsiinc"
setloglevel = 6
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $framework_1_3$
DefVar $framework_1_4$
DefVar $appx$
DefVar $ExitCode$
set $ProductId$ = "xodo-pdf-reader"
set $MinimumSpace$ = "300 MB"
set $framework_1_3$ = "Microsoft.NET.Native.Framework.1.3.appx"
set $framework_1_4$ = "Microsoft.NET.Native.Runtime.1.4.appx"
set $appx$ = "Xodo_Windows10_4.0.3.0_x64_ReleaseForStore.appx"
Message "Installing Xodo PDF Reader"
if not(HasMinimumSpace ("%SYSTEMDRIVE%", $MinimumSpace$))
LogError "Not enough space on %SYSTEMDRIVE%: . " + $MinimumSpace$ + " on Drive %SYSTEMDRIVE%: needed for " + $ProductId$ + "."
isFatalError
else
comment "show product picture"
ShowBitmap "%ScriptPath%\xodo_pdf_reader.png" $ProductId$
Message "Installing Xodo PDF Reader"
powershellCall('Add-AppxProvisionedPackage -SkipLicense -Online -PackagePath %scriptpath%\files\'+$framework_1_3$)
powershellCall('Add-AppxProvisionedPackage -SkipLicense -Online -PackagePath %scriptpath%\files\'+$framework_1_4$)
powershellCall('Add-AppxProvisionedPackage -SkipLicense -Online -PackagePath %scriptpath%\files\'+$appx$)
endif
Liebe Grüße