Jump to content
Ketarin forum

Need help with my DirectX Template!


Tomorrow
 Share

Recommended Posts

I used Shawns excellent Microsoft template to create this and it worked nicely but for some reason now every other day Ketarin keeps downloading wrong DirectX package.For example yesterday it tried to download a 2007 version.The other day it tried to download a 2009 version and so on.

 

Im thinking that the search matches the wrong version and then proceeds to download it.

 

EDIT: Confirmed.Both Google and MS find the wrong version and Ketarin proceeds to download.

 

I use the standard Google search posted on the template topic:

http://www.google.com/search?hl=&cat=&meta=&num=100&ie=utf-8&q=site%3Amicrosoft.com%2Fdownloads+%22{mssearch}%22#q=site:microsoft.com/downloads+%22{mssearch}%22&hl=en&tbo=1&tbs=qdr:y,sbd:1&prmd=ivfd&source=lnt&sa=X

 

Where {mssearch} is

directx redist

 

Here's the template:

<?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="bada2710-7eae-40dd-961f-a633a5ccf099">
   <SourceTemplate><![CDATA[<?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">
   <Name><placeholder name="Application Name?" value="DirectX Official" /></Name>
   <Category><placeholder name="Application Category?" value="Unassigned" /></Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile><placeholder name="Delete Previous Version?" value="true" options="false|true" /></DeletePreviousFile>
   <WebsiteUrl></WebsiteUrl>
   <UserNotes />
   <IgnoreFileInformation>false</IgnoreFileInformation>
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <Variables>
     <item>
       <key>
         <string>mssearch</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent><placeholder name="What is the search term on MS/Downloads?" value="directx redist" /></TextualContent>
           <Name>mssearch</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>mskey</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>FamilyID=([a-z\d\-]+)['"&]</Regex>
           <Url>http://www.microsoft.com/downloads/en/results.aspx?freetext=%22{mssearch}%22&displaylang=en&stype=ss_rr&nr=10&sortCriteria=Date&sortOrder=Descending</Url>
           <Name>mskey</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>Version:</div>\s+<div[^>]+>([^<>]+)</div></Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>sdownload</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <TextualContent>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</TextualContent>
           <Name>sdownload</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>swebsite</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID={mskey}</TextualContent>
           <Name>swebsite</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>schangelog</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent />
           <Name>schangelog</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>snotes</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <Name>snotes</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <ExecutePreCommand />
   <Enabled>true</Enabled>
   <FileHippoId />
   <TargetPath>.\{category}\{appname:regexreplace:([\s\t\r\n\-\\&]+):_}-{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{sdownload}</FixedDownloadUrl>
 </ApplicationJob>
</Jobs>]]></SourceTemplate>
   <WebsiteUrl>http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en</WebsiteUrl>
   <UserAgent />
   <UserNotes />
   <LastFileSize>100273008</LastFileSize>
   <LastFileDate>2010-06-05T00:26:02+03:00</LastFileDate>
   <IgnoreFileInformation>true</IgnoreFileInformation>
   <DownloadBeta>AlwaysDownload</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <SetupInstructions>
     <SetupInstruction xsi:type="StartProcessInstruction">
       <EnvironmentVariables />
       <FileName>{file}</FileName>
       <Parameters>/Q /T:"%temp%"</Parameters>
       <WaitForExit>true</WaitForExit>
     </SetupInstruction>
     <SetupInstruction xsi:type="CustomSetupInstruction">
       <Code>%temp%\DXSETUP.exe /SILENT</Code>
       <Type>Batch</Type>
     </SetupInstruction>
   </SetupInstructions>
   <Variables>
     <item>
       <key>
         <string>mssearch</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>directx redist june</TextualContent>
           <Name>mssearch</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>mskey</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>FamilyID=([a-z\d\-]+)['"&]</Regex>
           <Url>http://www.google.com/search?hl=&cat=&meta=&num=100&ie=utf-8&q=site%3Amicrosoft.com%2Fdownloads+%22{mssearch}%22#q=site:microsoft.com/downloads+%22{mssearch}%22&hl=en&tbo=1&tbs=qdr:y,sbd:1&prmd=ivfd&source=lnt&sa=X</Url>
           <Name>mskey</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>sdownload</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <TextualContent>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</TextualContent>
           <Name>sdownload</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>swebsite</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID={mskey}</TextualContent>
           <Name>swebsite</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>prettyversion</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>StartEnd</VariableType>
           <Regex />
           <Url>http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID={mskey}</Url>
           <StartText>DirectX End-User Runtimes (</StartText>
           <EndText>)</title><</EndText>
           <TextualContent />
           <Name>prettyversion</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand>"{file}" /Q /T:"%temp%"
"%temp%\DXSETUP.exe" /SILENT</ExecuteCommand>
   <ExecutePreCommand />
   <ExecuteCommandType>Batch</ExecuteCommandType>
   <ExecutePreCommandType>Batch</ExecutePreCommandType>
   <Category>Drivers</Category>
   <SourceType>FixedUrl</SourceType>
   <PreviousLocation>D:\Windows 7\Hotfixes\Manual\DirectX Official June 2010.exe</PreviousLocation>
   <DeletePreviousFile>true</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated>2010-12-13T17:31:01.3613281+02:00</LastUpdated>
   <TargetPath>{Resources}\Hotfixes\Manual\{appname} {prettyversion}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{sdownload}</FixedDownloadUrl>
   <Name>DirectX Official</Name>
 </ApplicationJob>
</Jobs>

 

Note that it is currently working because i added a dirty fix to namely search for the latest package.Meaning {mssearch} is:

directx redist june

 

But i would still like to get the original way to work.Also i have stopped sharing this to database(old copy remains) until this problem is fixed.

Link to comment
Share on other sites

Here is my DirectX redist app, using shawns awesome template. Works fine, returns the june easily.

 

<?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="b1110941-dbba-4de2-ae7d-e3e70d9e40ca">
   <SourceTemplate><![CDATA[<?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">
   <Name><placeholder name="Application Name?" value="DirectX Redist" /></Name>
   <Category><placeholder name="Application Category?" value="" /></Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile><placeholder name="Delete Previous Version?" value="true" options="false|true" /></DeletePreviousFile>
   <WebsiteUrl></WebsiteUrl>
   <UserNotes />
   <IgnoreFileInformation>false</IgnoreFileInformation>
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <Variables>
     <item>
       <key>
         <string>mssearch</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent><placeholder name="What is the search term on MS/Downloads?" value="DirectX Redist" /></TextualContent>
           <Name>mssearch</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>mskey</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>FamilyID=([a-z\d\-]+)['"&]</Regex>
           <Url>http://www.microsoft.com/downloads/en/results.aspx?freetext=%22{mssearch}%22&displaylang=en&stype=ss_rr&nr=10&sortCriteria=Date&sortOrder=Descending</Url>
           <Name>mskey</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>Version:</div>\s+<div[^>]+>([^<>]+)</div></Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>sdownload</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <TextualContent>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</TextualContent>
           <Name>sdownload</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>swebsite</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID={mskey}</TextualContent>
           <Name>swebsite</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>schangelog</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent />
           <Name>schangelog</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>snotes</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <Name>snotes</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <ExecutePreCommand />
   <Enabled>true</Enabled>
   <FileHippoId />
   <TargetPath>.\{category}\{appname:regexreplace:([\s\t\r\n\-\\&]+):_}-{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{sdownload}</FixedDownloadUrl>
 </ApplicationJob>
</Jobs>]]></SourceTemplate>
   <WebsiteUrl />
   <UserAgent />
   <UserNotes />
   <LastFileSize>0</LastFileSize>
   <LastFileDate xsi:nil="true" />
   <IgnoreFileInformation>false</IgnoreFileInformation>
   <DownloadBeta>Default</DownloadBeta>
   <DownloadDate xsi:nil="true" />
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <SetupInstructions>
     <SetupInstruction xsi:type="CustomSetupInstruction">
       <Code>{ue} "{file}" "{temppath}{appname:regexreplace: \(.*\):}"
"{temppath}{appname:regexreplace: \(.*\):}\dxsetup.exe" /silent</Code>
       <Type>Batch</Type>
     </SetupInstruction>
   </SetupInstructions>
   <Variables>
     <item>
       <key>
         <string>mssearch</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>DirectX Redist</TextualContent>
           <Name>mssearch</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>mskey</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>FamilyID=([a-z\d\-]+)['"&]</Regex>
           <Url>http://www.microsoft.com/downloads/en/results.aspx?freetext=%22{mssearch}%22&displaylang=en&stype=ss_rr&nr=10&sortCriteria=Date&sortOrder=Descending</Url>
           <Name>mskey</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>Version:</div>\s+<div[^>]+>([^<>]+)</div></Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>sdownload</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</Regex>
           <Url>http://www.microsoft.com/downloads/en/details.aspx?displayLang=en&FamilyID={mskey}</Url>
           <TextualContent>onclick="openDownloadWindow\('([^'"]+download[^'"]+)['"]</TextualContent>
           <Name>sdownload</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>swebsite</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID={mskey}</TextualContent>
           <Name>swebsite</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>schangelog</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent />
           <Name>schangelog</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>snotes</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <Name>snotes</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand>/*This is a comment line, the line below is the C# script. It will run the instructions found in the Setup Tab*/
app.Install(null);</ExecuteCommand>
   <ExecutePreCommand />
   <ExecuteCommandType>CS</ExecuteCommandType>
   <ExecutePreCommandType>Batch</ExecutePreCommandType>
   <Category>System</Category>
   <SourceType>FixedUrl</SourceType>
   <PreviousLocation>D:\Software\Programs\System\directx_Jun2010_redist.exe</PreviousLocation>
   <DeletePreviousFile>true</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath>{downloadpath}{category}\</TargetPath>
   <FixedDownloadUrl>{sdownload}</FixedDownloadUrl>
   <Name>DirectX Redist</Name>
 </ApplicationJob>
</Jobs>

Link to comment
Share on other sites

Thanks i replaced google with ms search for now:

http://www.microsoft.com/downloads/en/results.aspx?freetext=%22{mssearch}%22&displaylang=en&stype=ss_rr&nr=10&sortCriteria=Date&sortOrder=Descending

Let's see how long this works tho because the ms search is prone to go nuts now and then.

Link to comment
Share on other sites

I didn't look too deeply into this as I never had a problem, however the string provided by the template already includes quotation marks. I remember only having one problem and just added my own without checking if they were included, but i've still been fine to this day except for just right now. But as soon as I update just after the botched attempt it finds the original file fine, google/ms search regardless the results are the same. I believe is a problem with the MS download site more than the search.

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.