Jump to content
Ketarin forum

Troubleshooting ps function


shawn
 Share

Recommended Posts

Since there are two different potential sources of a version number in the changelogs for Adobe Reader now I figured I would try parsing the SCUP catalog values instead, since it's only one value and it'll always be accurate. I was hoping I could pass a parameter to the :ps function (like {myscript:ps:myparam}) but that didn't work, so I had to split it up into several scripts. That's fine, but for some reason it's still not actually consuming the last line of the ps script as I expect it to. 

Here's the app:

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="8ecc9087-14ca-420b-9a85-21e99102f5cf">
    <Category>Viewers</Category>
    <WebsiteUrl>https://get.adobe.com/reader</WebsiteUrl>
    <UserAgent>{chrome}</UserAgent>
    <UserNotes />
    <LastFileSize>312086528</LastFileSize>
    <LastFileDate>2022-08-10T21:37:40.503689</LastFileDate>
    <IgnoreFileInformation>false</IgnoreFileInformation>
    <DownloadBeta>Avoid</DownloadBeta>
    <DownloadDate>2008-11-22T23:07:01</DownloadDate>
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>version</VariableChangeIndicator>
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>true</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables>
      <item>
        <key>
          <string>schangelog</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>{schangelogps:ps}</TextualContent>
            <Name>schangelog</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>swebsite</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>https://get.adobe.com/reader</TextualContent>
            <Name>swebsite</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>snotes</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent />
            <Name>snotes</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>spc</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>readerpatch</TextualContent>
            <Name>spc</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>sdownload</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>{sdownloadps:ps}</TextualContent>
            <Name>sdownload</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>LastUpdate</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>20220810T2137</TextualContent>
            <Name>LastUpdate</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>sbits</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>64</TextualContent>
            <Name>sbits</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>splatform</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>windows</TextualContent>
            <Name>splatform</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>svendor</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>Adobe</TextualContent>
            <Name>svendor</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>LastVersion</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>22.002.20191</TextualContent>
            <Name>LastVersion</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>version</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>{versionps:ps}</TextualContent>
            <Name>version</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>versionps</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") -gt 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $version;</TextualContent>
            <Name>versionps</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>schangelogps</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") -gt 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $changelog;</TextualContent>
            <Name>schangelogps</Name>
          </UrlVariable>
        </value>
      </item>
      <item>
        <key>
          <string>sdownloadps</string>
        </key>
        <value>
          <UrlVariable>
            <RegexRightToLeft>false</RegexRightToLeft>
            <VariableType>Textual</VariableType>
            <Regex />
            <TextualContent>wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") -gt 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $url;</TextualContent>
            <Name>sdownloadps</Name>
          </UrlVariable>
        </value>
      </item>
    </Variables>
    <ExecuteCommand />
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <SourceType>FixedUrl</SourceType>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2022-08-10T21:37:40.503689</LastUpdated>
    <TargetPath>..\{category}\{appname:regexreplace:([\s\t\r\n\-\&amp;]+):_}-{version}.{url:ext}</TargetPath>
    <FixedDownloadUrl>{sdownload}</FixedDownloadUrl>
    <Name>__Adobe Reader DC Patch (test x64)</Name>
  </ApplicationJob>
</Jobs>

 

The powershell (below) works in a powershell window and you can see that it is consuming them correctly in the log below. Here's the powershell script for the version parser:

wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") -gt 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $version;

 

Here's the log:

2022-08-16 22:49:21: Update started with 1 application(s)
2022-08-16 22:49:21: __Adobe Reader DC Patch (test x64): Replacing {sdownloadps} in '{sdownloadps:ps}' with 'wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") > 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $url;'
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: 7-Zip (a) 22.01 (x86) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: Scanning the drive for archives:
2022-08-16 22:49:24: PowerShell: 1 file, 96074 bytes (94 KiB)
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: Extracting archive: c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: WARNINGS:
2022-08-16 22:49:24: PowerShell: There are data after the end of archive
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: --
2022-08-16 22:49:24: PowerShell: Path = c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:24: PowerShell: Type = Cab
2022-08-16 22:49:24: PowerShell: WARNINGS:
2022-08-16 22:49:24: PowerShell: There are data after the end of archive
2022-08-16 22:49:24: PowerShell: Physical Size = 86082
2022-08-16 22:49:24: PowerShell: Tail Size = 9992
2022-08-16 22:49:24: PowerShell: Method = MSZip
2022-08-16 22:49:24: PowerShell: Blocks = 1
2022-08-16 22:49:24: PowerShell: Volumes = 1
2022-08-16 22:49:24: PowerShell: Volume Index = 0
2022-08-16 22:49:24: PowerShell: ID = 0
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: Everything is Ok
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: Archives with Warnings: 1
2022-08-16 22:49:24: PowerShell: 
2022-08-16 22:49:24: PowerShell: Warnings: 1
2022-08-16 22:49:24: PowerShell: Size:       2581238
2022-08-16 22:49:24: PowerShell: Compressed: 96074
2022-08-16 22:49:24: PowerShell: https://ardownload3.adobe.com/pub/adobe/reader/win/AcrobatDC/2200220191/AcroRdrDCUpd2200220191_MUI.msp
2022-08-16 22:49:24: __Adobe Reader DC Patch (test x64): Replacing {sdownload} in '{sdownload}' with ''
2022-08-16 22:49:24: __Adobe Reader DC Patch (test x64): Checking if update is required...
2022-08-16 22:49:24: __Adobe Reader DC Patch (test x64): Replacing {versionps} in '{versionps:ps}' with 'wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") > 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $version;'
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: 7-Zip (a) 22.01 (x86) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: Scanning the drive for archives:
2022-08-16 22:49:26: PowerShell: 1 file, 96074 bytes (94 KiB)
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: Extracting archive: c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: WARNINGS:
2022-08-16 22:49:26: PowerShell: There are data after the end of archive
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: --
2022-08-16 22:49:26: PowerShell: Path = c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:26: PowerShell: Type = Cab
2022-08-16 22:49:26: PowerShell: WARNINGS:
2022-08-16 22:49:26: PowerShell: There are data after the end of archive
2022-08-16 22:49:26: PowerShell: Physical Size = 86082
2022-08-16 22:49:26: PowerShell: Tail Size = 9992
2022-08-16 22:49:26: PowerShell: Method = MSZip
2022-08-16 22:49:26: PowerShell: Blocks = 1
2022-08-16 22:49:26: PowerShell: Volumes = 1
2022-08-16 22:49:26: PowerShell: Volume Index = 0
2022-08-16 22:49:26: PowerShell: ID = 0
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: Everything is Ok
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: Archives with Warnings: 1
2022-08-16 22:49:26: PowerShell: 
2022-08-16 22:49:26: PowerShell: Warnings: 1
2022-08-16 22:49:26: PowerShell: Size:       2581238
2022-08-16 22:49:26: PowerShell: Compressed: 96074
2022-08-16 22:49:26: PowerShell: 22.002.20191
2022-08-16 22:49:26: __Adobe Reader DC Patch (test x64): Replacing {version} in '{version}' with ''
2022-08-16 22:49:26: __Adobe Reader DC Patch (test x64): Update not required, {version} has not changed
2022-08-16 22:49:26: __Adobe Reader DC Patch (test x64): Replacing {versionps} in '{versionps:ps}' with 'wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") > 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $version;'
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: 7-Zip (a) 22.01 (x86) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: Scanning the drive for archives:
2022-08-16 22:49:29: PowerShell: 1 file, 96074 bytes (94 KiB)
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: Extracting archive: c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: WARNINGS:
2022-08-16 22:49:29: PowerShell: There are data after the end of archive
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: --
2022-08-16 22:49:29: PowerShell: Path = c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:29: PowerShell: Type = Cab
2022-08-16 22:49:29: PowerShell: WARNINGS:
2022-08-16 22:49:29: PowerShell: There are data after the end of archive
2022-08-16 22:49:29: PowerShell: Physical Size = 86082
2022-08-16 22:49:29: PowerShell: Tail Size = 9992
2022-08-16 22:49:29: PowerShell: Method = MSZip
2022-08-16 22:49:29: PowerShell: Blocks = 1
2022-08-16 22:49:29: PowerShell: Volumes = 1
2022-08-16 22:49:29: PowerShell: Volume Index = 0
2022-08-16 22:49:29: PowerShell: ID = 0
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: Everything is Ok
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: Archives with Warnings: 1
2022-08-16 22:49:29: PowerShell: 
2022-08-16 22:49:29: PowerShell: Warnings: 1
2022-08-16 22:49:29: PowerShell: Size:       2581238
2022-08-16 22:49:29: PowerShell: Compressed: 96074
2022-08-16 22:49:29: PowerShell: 22.002.20191
2022-08-16 22:49:29: __Adobe Reader DC Patch (test x64): Replacing {version} in '{version}' with ''
2022-08-16 22:49:29: __Adobe Reader DC Patch (test x64): Replacing {spc} in '{spc}' with 'readerpatch'
2022-08-16 22:49:29: __Adobe Reader DC Patch (test x64): Replacing {sdownloadps} in '{sdownloadps:ps}' with 'wget.exe --directory-prefix="c:\downloads\" --timestamping "https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab"
7z.exe e -y -o"c:\downloads" c:\downloads\ReaderCatalog-DC.cab
sleep -s 2;
[xml]$xml = get-content "c:\downloads\Reader_Catalog.xml";
$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].LocalizedProperties.Title;
if ($title.indexOf("x64") > 0){
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-1].Properties.MoreInfoUrl;
}else{
	$title = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].LocalizedProperties.Title;
	$url = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.originfile.OriginUri;
	$version = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].InstallableItem.ApplicabilityRules.Metadata.MsiPatchMetadata.MsiPatch.TargetProduct.UpdatedVersion;
	$changelog = $xml.SystemsManagementCatalog.SoftwareDistributionPackage[-2].Properties.MoreInfoUrl;
}
echo $url;'
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: 7-Zip (a) 22.01 (x86) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: Scanning the drive for archives:
2022-08-16 22:49:31: PowerShell: 1 file, 96074 bytes (94 KiB)
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: Extracting archive: c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: WARNINGS:
2022-08-16 22:49:31: PowerShell: There are data after the end of archive
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: --
2022-08-16 22:49:31: PowerShell: Path = c:\downloads\ReaderCatalog-DC.cab
2022-08-16 22:49:31: PowerShell: Type = Cab
2022-08-16 22:49:31: PowerShell: WARNINGS:
2022-08-16 22:49:31: PowerShell: There are data after the end of archive
2022-08-16 22:49:31: PowerShell: Physical Size = 86082
2022-08-16 22:49:31: PowerShell: Tail Size = 9992
2022-08-16 22:49:31: PowerShell: Method = MSZip
2022-08-16 22:49:31: PowerShell: Blocks = 1
2022-08-16 22:49:31: PowerShell: Volumes = 1
2022-08-16 22:49:31: PowerShell: Volume Index = 0
2022-08-16 22:49:31: PowerShell: ID = 0
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: Everything is Ok
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: Archives with Warnings: 1
2022-08-16 22:49:31: PowerShell: 
2022-08-16 22:49:31: PowerShell: Warnings: 1
2022-08-16 22:49:31: PowerShell: Size:       2581238
2022-08-16 22:49:31: PowerShell: Compressed: 96074
2022-08-16 22:49:31: PowerShell: https://ardownload3.adobe.com/pub/adobe/reader/win/AcrobatDC/2200220191/AcroRdrDCUpd2200220191_MUI.msp
2022-08-16 22:49:31: __Adobe Reader DC Patch (test x64): Replacing {sdownload} in '{sdownload}' with ''
2022-08-16 22:49:31: __Adobe Reader DC Patch (test x64): Replacing {LastUpdate} in '{LastUpdate}' with '20220810T2137'
2022-08-16 22:49:31: __Adobe Reader DC Patch (test x64): Replacing {sbits} in '{sbits}' with '64'
2022-08-16 22:49:31: __Adobe Reader DC Patch (test x64): Replacing {splatform} in '{splatform}' with 'windows'
2022-08-16 22:49:31: __Adobe Reader DC Patch (test x64): Replacing {LastVersion} in '{LastVersion}' with '22.002.20191'
2022-08-16 22:49:31: Update finished

I'm sure I'm missing something obvious, but I'm just not seeing the bug. Any thoughts?

Edited by shawn
fixed x64 test
Link to comment
Share on other sites

The other two (inconsistent) sources are https://helpx.adobe.com/acrobat/release-note/release-notes-acrobat-reader.html with:

DC[^'"()]+?\(([\d\.]+x?)\).+?>Continuous

And this is the other one (two-stage) - URL:

(https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/continuous/[^'"]+)"[^<>]+>DC[^'"()]+?\(([\d\.]+x?)\).+?>Continuous

Version:

([\d\.]+) \(Win

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.