[wpkg-users] OS and architecture checks

David Petterson david at ifm.liu.se
Thu Sep 8 09:43:11 CEST 2011


< Actually for iTunes there is an edition vor 64-bit host OS and one for
32-bit. The 32-bit edition is supposed to work on XP-x86 and Win7-x86
while the 64-bit edition is supposed to work on XP-x64 and Win7-x64.

Yes there is, and it works fine for Vista Win7, but does not work on the
64 bit version of Windows XP. Thats why I'm asking.

My package now looks like this, note the "check for XP64/Win2003"
registry condition check:
(btw, do I need those <exit code="0"/> or is 0 always accepted as good?)

<package id="itunes" name="iTunes %version%" revision="%version%"
reboot="false" priority="100">
        <variable name="version" value="10.4.1.10"/>
        <depends package-id="quicktime"/>
        <check type='logical' condition='or'>
            <check type="registry" condition="equals"
path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\CurrentVersion" value="5.2"/>
            <check type='logical' condition='and'>
                <check type="uninstall" condition="exists" path="iTunes" />
                <check type='logical' condition='or'>
                    <check type="file" condition="versiongreaterorequal"
path="%PROGRAMFILES%\iTunes\iTunes.exe" value="%version%"/>
                    <check type="file" condition="versiongreaterorequal"
path="%PROGRAMFILES(x86)%\iTunes\iTunes.exe" value="%version%"/>
                </check>
            </check>
        </check>
        <install architecture="x86" cmd='msiexec /qn /norestart /I
"%SOFTWARE%\apple\iTunes.msi" DESKTOP_SHORTCUTS="0" /log
%TEMP%\itunes.log'><exit code="0" /><exit code='3010'/></install>
        <install architecture="x64" cmd='msiexec /qn /norestart /I
"%SOFTWARE%\apple\iTunes64.msi" DESKTOP_SHORTCUTS="0" /log
%TEMP%\itunes.log'><exit code="0" /><exit code='3010'/></install>
        <install cmd='%SOFTWARE%\tools\deletefiles.cmd "iTunes.lnk"
ALLDESKTOP'/>
        <upgrade architecture="x86" cmd='msiexec /qn /norestart /I
"%SOFTWARE%\apple\iTunes.msi" DESKTOP_SHORTCUTS="0" /log
%TEMP%\itunes.log'><exit code="0" /><exit code='3010'/></upgrade>
        <upgrade architecture="x64" cmd='msiexec /qn /norestart /I
"%SOFTWARE%\apple\iTunes64.msi" DESKTOP_SHORTCUTS="0" /log
%TEMP%\itunes.log'><exit code="0" /><exit code='3010'/></upgrade>
        <upgrade cmd='%SOFTWARE%\tools\deletefiles.cmd "iTunes.lnk"
ALLDESKTOP'/>
        <remove  architecture="x86" cmd='MsiExec.exe /qn /norestart /X
{C897FCB3-2F8B-4185-8035-79E2AF3A92A4} /log
%TEMP%\itunesuninstall.log'><exit code='0'/><exit code='1605'/><exit
code='3010'/></remove>
        <remove  architecture="x64" cmd='MsiExec.exe /qn /norestart /X
{BCF07271-A853-4D3A-B668-4B752174CAA8} /log
%TEMP%\itunesuninstall.log'><exit code='0'/><exit code='1605'/><exit
code='3010'/></remove>
    </package>


Btw, it would be nice if the architecture checks could work in the check
also, I tried it but got errors.
Like:
<check architecture="x86" type="file" condition="versiongreaterorequal"
path="%PROGRAMFILES%\iTunes\iTunes.exe" value="%version%"/>
<check architecture="x64" type="file" condition="versiongreaterorequal"
path="%PROGRAMFILES(x86)%\iTunes\iTunes.exe" value="%version%"/>

/David



More information about the wpkg-users mailing list