[wpkg-users] WPKG and AppX...

Kris Lou klou at themusiclink.net
Tue May 18 19:23:47 CEST 2021


I also noticed that your HP Support package is a AppxBundle, so you might
need to add "-PackageTypeFilter Bundle" for the removal.

If it helps, here's one of my AppX recipes -- though it is for removing
Dell-installed packages.  I use %ProgramFiles%\WindowsApps
and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\ (all
sorts of stuff here) for the check conditions.

 <package
            id="dell_digitaldelivery"
            name="Dell DigitalDelivery"
            revision="%VERSION%"
reboot="postponed"
            priority="0">

<!-- <variable name="WMIC_NAME" value="Dell Digital Delivery Service" /> -->
<variable name="WMIC_NAME" value="Dell Digital Delivery Services" />
<variable name="APPX_BUNDLE_NAME" value="*DellDigitalDelivery*" />
<variable name="VERSION" value="2" />
        <variable name="PKG_EXE_VERSION" value="" />
        <variable name="PKG_DESTINATION" value="%ProgramFiles%\" />
        <variable name="PKG_DESTINATION" value="%ProgramFiles(x86)%\"
architecture="x64"/>

<check type="logical" condition="or" >
<check type="uninstall" condition="exists" path="%WMIC_NAME%" />
<!-- Vostro 15 3500 -->
<check type="logical" condition="and" >
<check type="file" condition="exists"
path="%PROGRAMFILES%\WindowsApps\DellInc.DellDigitalDelivery_4.0.70.0_x64__htrsf667h5kn2"
/>
<check type="logical" condition="not" >
<check type="registry" condition="exists"
path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\DellInc.DellDigitalDelivery_htrsf667h5kn2"
/>
</check>
</check>

</check>

<install include="remove" />

<upgrade include="remove" />

        <remove cmd='wmic /node:localhost product where name="%WMIC_NAME%"
call uninstall /nointeractive' />
<remove cmd='powershell "Get-AppxPackage -AllUsers -PackageTypeFilter
Bundle -Name %APPX_BUNDLE_NAME% | Remove-AppxPackage -AllUsers" ' />
</package>

-----------

Having said that, apparently I use DISM for installing Appx, rather than
powershell.

<!-- Using Powershell to install/remove only adds to the running user.  -->
<!-- add-appxpackage -path
"%TEMP%\wpkg\5E8FC25E.XodoDocs_4.0.3.0_neutral___3v3sf0k6w2rec.AppxBundle"
-->
<install cmd='%COMSPEC% /C DISM.exe /Online /Add-ProvisionedAppxPackage
/PackagePath:"%TEMP%\wpkg\Microsoft.RawImageExtension_%VERSION%_neutral___8wekyb3d8bbwe.AppxBundle"
/SkipLicense' >

For this, I don't specify DependencyPackages (though registry shows that
VCLibs Appx package is dependent), but I do have a <depends> command that
points to my vcredist2015 package.  I don't know if the standard vcredist
packages include Appx portions, though.

Kris Lou
klou at themusiclink.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20210518/fa4bce65/attachment.html>


More information about the wpkg-users mailing list