[wpkg-users] WPKG and AppX...
Marco Gaiarin
gaio at sv.lnf.it
Tue May 11 12:22:35 CEST 2021
I'm trying to build a recipe for an AppX software, precisely HP Support
Assistant:
https://www8.hp.com/it/it/campaigns/hpsupportassistant/hpsupport.html
I'm currently installing version 8, that is a normal application, but
seems now 'discontinued' and so in Win10 i'm trying to install version
9, that is an appx.
My current experimental recipe is:
<package
id="hp-sa9"
name="HP Support Assistant 9"
revision="9.7.238.0:1"
priority="50"
reboot="false">
<!-- <check type="execute" condition="exitcodeequalto" path='%COMSPEC% /c powershell -Command "Get-AppxPackage -AllUsers AD2F1837.HPSupportAssistant | Select Status" | find " Ok"' value="0"/> -->
<check type="execute" condition="exitcodeequalto" path='%COMSPEC% /c powershell -Command "Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -EQ \"AD2F1837.HPSupportAssistant\"} | Select DisplayName" | find "AD2F1837.HPSupportAssistant"' value="0"/>
<download url='https://ftp.hp.com/pub/softpaq/sp112501-113000/sp112635.exe' target="WPKG\sp112635.exe" />
<install cmd='"%SOFTWARE%\WPKG\sp112635.exe" /s /e /f "%TEMP%"' >
<exit code="0" />
<exit code="1168" /> <!-- Non ho trovato documentazione... -->
</install>
<install architecture='x86' cmd='powershell -Command "Add-AppxProvisionedPackage -Online -PackagePath \"%TEMP%\HPSA9x\6db52270f55d43fd80e027dc9e394d61.appxbundle\" -LicensePath \"%TEMP%\HPSA9x\6db52270f55d43fd80e027dc9e394d61_License1.xml\" -DependencyPackagePath \"%TEMP%\HPSA9x\Dependencies\x86\Microsoft.VCLibs.x86.14.00.appx\",\"%TEMP%\HPSA9x\Dependencies\x86\Microsoft.NET.Native.Runtime.1.4.appx\",\"%TEMP%\HPSA9x\Dependencies\x86\Microsoft.NET.Native.Framework.1.3.appx\" | Out-Null"' />
<install architecture='x64' cmd='powershell -Command "Add-AppxProvisionedPackage -Online -PackagePath \"%TEMP%\HPSA9x\6db52270f55d43fd80e027dc9e394d61.appxbundle\" -LicensePath \"%TEMP%\HPSA9x\6db52270f55d43fd80e027dc9e394d61_License1.xml\" -DependencyPackagePath \"%TEMP%\HPSA9x\Dependencies\x64\Microsoft.VCLibs.x64.14.00.appx\",\"%TEMP%\HPSA9x\Dependencies\x64\Microsoft.NET.Native.Runtime.1.4.appx\",\"%TEMP%\HPSA9x\Dependencies\x64\Microsoft.NET.Native.Framework.1.3.appx\" | Out-Null"' />
<upgrade include='install' />
<downgrade include='upgrade' />
<remove cmd='powershell -Command "Get-AppxPackage -AllUsers AD2F1837.HPSupportAssistant | Remove-AppxPackage -AllUsers' >
<exit code='any' />
</remove>
<remove cmd='powershell -Command "Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -EQ \"AD2F1837.HPSupportAssistant\"} | Remove-AppxProvisionedPackage -Online | Out-Null"' />
</package>
But does not work.
Problem is:
a) check condition test the installation of the app in the ''user side''
(even for '-AllUsers'), not the 'system side', and this does not work
because WPKG run as SYSTEM user (via WPKG-GP), and apps seems get not
installed in SYSTEM, probably because there's no way to logon in
SYSTEM.
But i've not found a way to do a check condition so effective, a part
using something like:
powershell -Command "Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -EQ \"AD2F1837.HPSupportAssistant\"} | Select DisplayName" | find "AD2F1837.HPSupportAssistant"
that seems a little dumb to me. Seems also that i can uninstally
'system wide' the app, but still users that hav installed it can use
it. I'm a bit confused...
b) app does not work; complain about 'activation services' missing,
requiring to reboot or run windows update (done, nothing changed).
c) in deinstallation, i use:
<remove cmd='powershell -Command "Get-AppxPackage -AllUsers AD2F1837.HPSupportAssistant | Remove-AppxPackage -AllUsers' >
<exit code='any' />
</remove>
but this seems to work for Admnistrator, not for SYSTEM; return the
error:
C:\WINDOWS\system32>powershell -Command "Get-AppxPackage -AllUsers AD2F1837.HPSupportAssistant | Remove-AppxPackage -AllUsers
Remove-AppxPackage : Rimozione non riuscita. Contattare il produttore del software.
Impossibile eseguire l'operazione di distribuzione DeStage con volume di destinazione C: per il pacchetto
AD2F1837.HPSupportAssistant_9.7.238.0_x64__v10z8vjag6ke6 da . Errore: 0x80070002. Vedere
http://go.microsoft.com/fwlink/?LinkId=235160 per informazioni sulla diagnosi dei problemi di distribuzione delle app.
In riga:1 car:57
+ ... -AllUsers AD2F1837.HPSupportAssistant | Remove-AppxPackage -AllUsers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Remove-AppxPackage], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
WPKG wiki say little or nothing about AppX packages, so, i'm asking
here.
Thanks.
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797
Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
More information about the wpkg-users
mailing list