[wpkg-users] Microsoft .NET Desktop Runtime 6.0 ...

Andreas Habel andreas.habel at uis.no
Thu Feb 23 09:31:03 CET 2023


Hi Marco,

I am checking for the actual file version using "versiongreaterorequal":

<check type="file" condition="versiongreaterorequal" path="%PROGRAMFILES%\dotnet\dotnet.exe" value="6.0.1022.47605" />

If the .NET runtime gets updated to a higher version the check will still work.

Andreas


-- 
Andreas Habel
Petroleum engineering lab
Geosciences | Unix network
Faculty of Science and Technology
University of Stavanger
Norway


-----Original Message-----
From: wpkg-users <wpkg-users-bounces at lists.wpkg.org> On Behalf Of Marco Gaiarin
Sent: onsdag 22. februar 2023 11:59
To: wpkg-users at lists.wpkg.org
Subject: [wpkg-users] Microsoft .NET Desktop Runtime 6.0 ...


I've setup a recipe like:

<package
        id="ms-dotnet6"
        name="Microsoft .NET Desktop Runtime 6.0"
        revision="6.0.13:1"
        reboot="false"
        priority="50">

        <check type="logical" condition="or">
                <check type="logical" condition="and">
                        <check type="host" condition="architecture" value="x86" />
                        <check type="uninstall" condition="exists" path="Microsoft Windows Desktop Runtime - 6.0.13 (x86)" />
                </check>
                <check type="logical" condition="and">
                        <check type="host" condition="architecture" value="x64" />
                        <check type="uninstall" condition="exists" path="Microsoft Windows Desktop Runtime - 6.0.13 (x64)" />
                </check>
        </check>

        <install architecture='x86' cmd='"%SOFTWARE%\WPKG\windowsdesktop-runtime-6.0.13-win-x86.exe" /install /quiet /norestart' >
                <exit code="0" />
                <exit code="194" reboot="postponed" />
                <exit code="1603" />
                <exit code="3010" reboot="postponed" />
        </install>
        <install architecture='x64' cmd='"%SOFTWARE%\WPKG\windowsdesktop-runtime-6.0.13-win-x64.exe" /install /quiet /norestart' >
                <exit code="0" />
                <exit code="194" reboot="postponed" />
                <exit code="1603" />
                <exit code="3010" reboot="postponed" />
        </install>

        <upgrade include='install' />
        <downgrade include='upgrade' />

        <remove cmd='wmic product where "Name like 'Microsoft Windows Desktop Runtime - 6.0.%'" call uninstall /nointeractive' >
                <exit code="3010" reboot="postponed" />
        </remove>
</package>


And work as expected, but dotnet6 get upgraded via windows update and so the
check condition fail, because the version in 'uninstall' (eg, currently
6.0.14 version).

There's some way to use wildcards/regexp in uninstall check condition?!


Thanks.

--
  Io ammiro gli americani per come fanno le trattative: prima di tutto
  pensano a se stessi, poi a se stessi, e solo alla fine a se stessi.
                                                (Ignacio Lula da Silva)


---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users at lists.wpkg.org
https://lists.wpkg.org/mailman/listinfo/wpkg-users
Denne eposten er sendt utenfra organisasjonen. Vurder om det er trygt å åpne lenker og vedlegg.
This email originated from outside of the organization. Please consider whether it is safe to open links and attachments.


More information about the wpkg-users mailing list