Jump to content
Ketarin forum
  • Announcements

jokerfool

Updating Bug

Recommended Posts

When I add a new application for example Blah.zip and rename the AllApps to Blah and head on over too Commands and see this:

7z x "{file}" -o"{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\" -y
del /q "{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\*.zip"

When the file is first update, Blah.zip is downloaded, extracted, then deleted.

But when running Check For Update and we come across this folder, the update will always tell the user the Blah folder an update is required because Blah.zip can't be located so we can't run a check to see if there is an update, so we must now instruct you to download the new update and repeat the process above.

So lets remove this line:

del /q "{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\*.zip"

We try again and now we've all green ticks, but now we've a bigger problem.

If Company Blah releases an update and inside the original Blah.zip it sais Blah but the new update they release is called Blah 2.0 then we've a problem because the original folder called Blah will still be there and a disaster in the making.

Lets go ahead 1 year and now the Blah folder has 50 updated folders all different versions.

 

Is there only way to solve this to use that Variable option? Because I can't see any other way to check for an update without the file zip physically being located in the folder.

 

Thank you.

Share this post


Link to post
Share on other sites

This application AltTabPlus Portable from MajorGeeks

Download URL: http://www.gegeek.com/documents/downloads/toolkit_files/AltPlusTab.exe

Variable >> Content from URL: http://www.majorgeeks.com/mg/getmirror/altplustab,1.html

This line is extracted: <!-- Debug: http://files2.majorgeeks.com/a7b24870be7dd0354bf48eabb64506983dd61d88/appearance/APT.zip -->

The command section says:

7z x "{file}" -o"{root}GEGeek_Toolkit\ProgramFiles\{category}\AltTabPlus Portable\" -y
del /q "{root}GEGeek_Toolkit\ProgramFiles\{category}\AltTabPlus Portable\*.zip"

and yet also has a green tick

Updating Log File:

21/06/2017 07:02:47: AltTabPlus Portable: Using referer: http://www.majorgeeks.com/mg/getmirror/altplustab,1.html
21/06/2017 07:02:48: AltTabPlus Portable: Server source file: /documents/downloads/toolkit_files/AltPlusTab.exe
21/06/2017 07:02:48: AltTabPlus Portable: Determined target file name: c:\GEGeek_Toolkit\ProgramFiles\Configurations\AltTabPlus Portable\AltPlusTab.exe
21/06/2017 07:02:48: AltTabPlus Portable: Checking if update is required...
21/06/2017 07:02:48: AltTabPlus Portable: Update not required, since date and file size remain unchanged
21/06/2017 07:02:49: Update finished

Share this post


Link to post
Share on other sites
shawn   
Quote

Is there only way to solve this to use that Variable option? Because I can't see any other way to check for an update without the file zip physically being located in the folder.

Yes. Use the option "Ignore file information (do not redownload if file is missing)". This seems to be a popular topic right now. :)

ignore-file-information.png

Share this post


Link to post
Share on other sites

This doesn't always work, when telling the list to update I get an error, I check the error and the file is still there. I do a manual check update on that one app and it tells me

Update not required, since date and file size remain unchanged

How would it know this if the file hasn't even been downloaded. I deleted all the applications before hand.

Share this post


Link to post
Share on other sites
shawn   

it knows based on several different variables. 

1) if you're using the "use following variable for indicator of changes" then it will use that variable. you can populate that variable yourself with the variables feature by scraping the source site for the version number, hash or some other unique value for each version

2) if you're not using a change indicator yourself, then ketarin will analyze the HTTP headers to determine if the download is the same file. it can do this without downloading the file by looking at several different headers, including "Age", "Content-Length", "Date", "ETag", and "Last-Modified".

These headers (or variations of them) can be returned on a HEAD request, so the complete file does not have to be downloaded in order to determine if it is the same file that was already downloaded. Unfortunately, some sites do not behave well or do not include these headers. In these cases especially (but really, in *all* cases) you should be scraping the site first for a version indicator. 

If you want to FORCE it to download then you need to use the force option (Ctrl+F5 / aka "force download"). This method will force the download to be attempted again, and re-download the file, even if Ketarin does not believe it is a new file.

Share this post


Link to post
Share on other sites
29/06/2017 8:06:33 PM: Avira AV: Server source file: /download/file/4a53fc60dffb4ba749a33f7f81e3a71e11ca7713ddc310b2b762aa5962286d04
29/06/2017 8:06:33 PM: Avira AV: Determined target file name: c:\GEGeek_Toolkit\ProgramFiles\Malware Removal\Avira AV\avira_en_free0___flh.exe
29/06/2017 8:06:33 PM: Avira AV: Checking if update is required...
29/06/2017 8:06:33 PM: Avira AV: Update required, MD5 does not match
29/06/2017 8:06:33 PM: Avira AV: Skipped downloading updates
29/06/2017 8:06:34 PM: Update finished

Cant get this one either. Stays on yellow.

Share this post


Link to post
Share on other sites

Now have a serious issue. I have nothing in the ProgramFiles, if I right click and choose check for update it now comes back with a green tick and says no update, this couldnt be any worse.

 

This is coming from FileHippo

 

11/07/2017 5:33:15 PM: .NET Framework Version: Using referer: (none)
11/07/2017 5:33:16 PM: .NET Framework Version: Server source file: /download/file/cf1422779457ca44389fb09c5eec1128a64dea8f1c615c28b907d0ff1e466d77
11/07/2017 5:33:16 PM: .NET Framework Version: Determined target file name: c:\GEGeek_Toolkit\ProgramFiles\Apps To Install\.NET Framework Version\NDP47-KB3186497-x86-x64-AllOS-ENU.exe
11/07/2017 5:33:16 PM: .NET Framework Version: Checking if update is required...
11/07/2017 5:33:16 PM: .NET Framework Version: Update not required, since date and file size remain unchanged
11/07/2017 5:33:17 PM: Update finished

File hasnt even downloaded yet.

 

FireFox: also FileHippo

11/07/2017 5:34:26 PM: Firefox: Using referer: (none)
11/07/2017 5:34:27 PM: Firefox: Server source file: /download/file/980836087a9baa42859ff1175292123d7ba18edfa750fc6a2d3dfb7f0f591d2a
11/07/2017 5:34:27 PM: Firefox: Determined target file name: c:\GEGeek_Toolkit\ProgramFiles\Apps To Install\Firefox\Firefox Setup 54.0.1.exe
11/07/2017 5:34:27 PM: Firefox: Checking if update is required...
11/07/2017 5:34:27 PM: Firefox: Update not required, since date and file size remain unchanged
11/07/2017 5:34:27 PM: Update finished

11.782 members all having to right click Force Download because Check For Updates doesnt work. Not happy.

 

Its not just FileHippo its coming from a lot of sites. Even my own domain.

Share this post


Link to post
Share on other sites
floele   

Please post an application exported as XML for someone else to reproduce. I'd assume Ketarin gets be basic functionality right, but it may very well be that the application is misconfigured and isn't working as expected.

Share this post


Link to post
Share on other sites

Ive been using the beta version. Below is 1.8.7

24/07/2017 1:43:44 PM: Update started with 1 application(s)
24/07/2017 1:43:44 PM: Avast: Using referer: (none)
24/07/2017 1:43:44 PM: Avast: Server source file: /documents/Downloads/Toolkit_Files/AVUninstallers/Avast/UninstallTool/avastclear.exe
24/07/2017 1:43:44 PM: Avast: Determined target file name: h:\GEGeek_Toolkit\ProgramFiles\Anti Virus Uninstallers\Avast\avastclear.exe
24/07/2017 1:43:44 PM: Avast: Checking if update is required...
24/07/2017 1:43:44 PM: Avast: Update not required, since date and file size remain unchanged
24/07/2017 1:43:45 PM: Update finished

This first one is with the Ignore File information ticked

<?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="96dd4481-da75-4cd7-b230-a3c700587546">
    <WebsiteUrl />
    <UserAgent />
    <UserNotes />
    <LastFileSize>8553032</LastFileSize>
    <LastFileDate>2017-06-29T03:31:00.2646935</LastFileDate>
    <IgnoreFileInformation>true</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator />
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables />
    <ExecuteCommand />
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category>Anti Virus Uninstallers</Category>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>h:\GEGeek_Toolkit\ProgramFiles\Anti Virus Uninstallers\Avast\avastclear.exe</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2017-06-29T03:31:00.2646935</LastUpdated>
    <TargetPath>{root}GEGeek_Toolkit\ProgramFiles\{category}\Avast\</TargetPath>
    <FixedDownloadUrl>http://www.gegeek.com/documents/Downloads/Toolkit_Files/AVUninstallers/Avast/UninstallTool/avastclear.exe</FixedDownloadUrl>
    <Name>Avast</Name>
  </ApplicationJob>
</Jobs>

This one isnt and yet same issue

<?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="96dd4481-da75-4cd7-b230-a3c700587546">
    <WebsiteUrl />
    <UserAgent />
    <UserNotes />
    <LastFileSize>8553032</LastFileSize>
    <LastFileDate>2017-06-29T03:31:00.2646935</LastFileDate>
    <IgnoreFileInformation>false</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator />
    <HashVariable />
    <HashType>None</HashType>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions />
    <Variables />
    <ExecuteCommand />
    <ExecutePreCommand />
    <ExecuteCommandType>Batch</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <Category>Anti Virus Uninstallers</Category>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>h:\GEGeek_Toolkit\ProgramFiles\Anti Virus Uninstallers\Avast\avastclear.exe</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2017-06-29T03:31:00.2646935</LastUpdated>
    <TargetPath>{root}GEGeek_Toolkit\ProgramFiles\{category}\Avast\</TargetPath>
    <FixedDownloadUrl>http://www.gegeek.com/documents/Downloads/Toolkit_Files/AVUninstallers/Avast/UninstallTool/avastclear.exe</FixedDownloadUrl>
    <Name>Avast</Name>
  </ApplicationJob>
</Jobs>

It tells me that the file doesnt need updating yet in the programfiles directory there are no files.

Share this post


Link to post
Share on other sites
floele   

I suppose that Ketarin compares to the file at the location it previously downloaded to successfully.

If the file to compare to is missing and the option "delete previous file" is on, it will check the location the file has been saved to the last time (I assume there is such a location and the file is still there). I added a log message for future versions of Ketarin which shows the behaviour.

Share this post


Link to post
Share on other sites

So how does this fix the issue overall. Right now its not just the file on my server but also everywhere else. 900+ applications, 12000 members and too many emails from people choosing update all and all coming back with green ticks and nothing was downloaded :(

Share this post


Link to post
Share on other sites
floele   

Please use the new beta for checking what file is being compared: 

At the moment, you would have to delete the file in order to force a re-download.

The reasoning behind this is when you have a dynamic target file name (only folder is specified and name depends on whatever the website gives you), there may not be a file at the target location if just the names changes. So Ketarin compares to the previously downloaded file. If you give your users a database with the last download location being on some server, Ketarin will not download locally either. I don't see how to change this without breaking the existing behaviour (or adding another option for this).

 

 

Share this post


Link to post
Share on other sites

So how can I rectify the issue I have and set it back to the beginning? Because when I select all and run a check for update 90% come back green ticked even though the files haven't been downloaded. Any help please.

 

Thanks

 

Jason

Share this post


Link to post
Share on other sites
floele   

Check the log with the current beta for the file paths that are being checked and delete those.

Share this post


Link to post
Share on other sites
shawn   

Another option is to dynamically parse the zip file. As it is you're just extracting the contents to a destination folder and preserving destination filenames (7z x -o). You have a couple options.

1) you could remove the destination folder completely before extraction.

rd /s /q "{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\"
7z x "{file}" -o"{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\" -y
del /q "{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\*.zip"

This method removes the entire folder, of course, so you don't want to do that if you're downloading other apps to "Blah". I use this method for ISOs that come in zip files or are distributed via torrent, so that the resulting folder includes ONLY the new ISO.

2) You could opt instead to parse the zip file with "7z l" then individually process its contents. This takes a more tolerant and forward-thinking approach, especially if the contents are not in a consistent format. For example:

FOR /F "tokens=6* delims= " %%a IN ('7z l {file}') DO (
	set test=%%a
	if not "!test:important=!"=="!test!" echo [7z e "{file}" -o"{root}GEGeek_Toolkit\ProgramFiles\{category}\Blah\" -y "%%a"]
)

Replace "important" with a portion of the filename that you need to extract, and it will only execute on those files that match that pattern.

Share this post


Link to post
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


×