Getting the most productivity out of life! (With an emphasis on computing!)

Monday, March 22, 2010

Using Ketarin to Automatically Update Software Packages

Program Overview

After using Debian, it quickly becomes frustrating switching to Windows... especially when you want to easily and quickly check and update all of your software packages. There are several programs that allow some similar functionality, such as AppSnap and AppUpdater, but I find that Ketarin has the most features and offers the most flexibility and customization.

When you first launch Ketarin, you will not have any applications in your window, and as a first step we will quickly add an application from an online database.

Adding Applications - the Easy Way

Click on the arrow for "Add new application" and from the drop down menu select "Import from online database". Next you just need to search for the application you need, select it and hit "Import". The application will automatically be added to your list.
Next, we need to configure the application so that it automatically downloads to the correct directory. To do this, we need to understand Ketarin variables. Below is a list of common variables from the Ketarin Howto, found here.

Name

Content

Example

{file}

Location of the downloaded file (only for commands)Remember to enclose this variable in double quotes (”) if the path contains spaces.

c:\…\x.exe

{filesize}

Size of the downloaded file in bytes

1482245

{root}

Root of the application startup path

c:\

{category}

Category of the application

Security

{appname}

Name of the application

Ketarin

{appguid}

GUID of the application

{AC1DB…}

{url:ext}

Extension of the file that is being downloaded

exe

{url:basefile}

Base file name of the file that is being downloaded

Ketarin-0.9

Now, we can use the variables to create a download path and name for our application, so we can copy and paste the line into every single application we download. Let us take a look at a sample application shown below.

We can see the application we are downloading is the ffdshow codec, and that we are downloading it into the Media category. Using the variables we can see that we are downloading the file to C:\Apps\Media\ffdshowx64.exe.

Adding Applications From FileHippo

You will notice that there is an option for "FileHippo ID". This is another excellent option for downloading programs. Just search for a program on filehippo, and use the last part of the URL (after download) as the ID. For example, for Trillian Astra, the FileHippo URL is http://filehippo.com/download_trillian_astra/. The FileHippo ID would be "trillian_astra". These two options are the easy options for step one for obtaining the most updated program files from the internet.

Installing Applications Automatically

The second step can be found in the "Commands" section. There is an option for Ketarin to run commands before or after downloading the application. In this instance, since we want to install the application after it is downloaded, we need to get the application to install silently after download. This is actually the tricky part. It can be a challenge to discover what switches are needed to make sure the application installs silently. Unfortunately, some applications do not even offer the option of installing silently, and those will have to be installed manually.

Above is show the command we are executing after ffdshowx64 to get it to install correctly. Using the Ketarin variable {file}, we do not have to enter the entire path manually, which is a very nice feature. Some of the common silent install switches are: /s /S /q (/q is for msi files mostly) /SILENT /VERYSILENT /quiet.

You can also run the installer with the /? switch, and sometimes it will tell you the silent install option. If all else fails, Google it.

Installing Applications - the Hard Way

Unfortunately, you will run into applications that require a little bit more work to download easily. While filehippo has a good amount of files, it will certainly not have all of the files you may need. This is where things get tricky. You will need to specify where to download the file, and (even more difficult) tell the program how to determine what the filename will be. Lets take a look at an example, namely Virtualdub x64. Virtualdub is available for download from Sourceforge, which is a tricky site to use. First, we need to determine what the latest version of Virtualdub is. To do so, the author's website becomes quite helpful.

http://virtualdub.org. The current version is easily noticed. Now we need to tell Ketarin to use that number to dynamically update the version number.

To do this, we need load the page in and select a variable, but before we can do that we need to specify a download location, which is where we use our sourceforge link:

However, you will notice the download link is different, the download URL is different from the page download process, so our download URL becomes: http://prdownloads.sourceforge.net/virtualdub/VirtualDub-{version}-AMD64.zip?download

Now, of course we need to specify a value for the {version} variable. For that we click on the variable button, which loads the following screen:

First, click on the plus button to add a variable, and name it version. Then add http://www.virtualdub.org to the "Contents from URL:" field, and hit load. Next search for your version number inside of the page. You should easily find it. Next, select the part of the line before it.. how much you select is up to you, and select "Use selection as start". Do the same for the part of the line after the version number. I assume Ketarin uses the start and end selections to make sure it has the correct version number, so choose carefully. If you program has a particularly tricky version number, you can specify multiple variables.

There! You added one program using the advanced method. Many of these programs will present a new challenge as they will all be different, but using these tools, you should be able to figure out how to extract the necessary information.

Now, to update all of your applications, all that is needed is to select "Check for updates and download" from the Ketarin Menu,

and all of your applications should automatically download, and install themselves in the background, without ever bothering you.

As well, if you are really a fanatic you can schedule a task to run with the following command:

This will cause Ketarin to run silently in the background updating, so you never even have to think about it.

The one drawback to Ketarin is that sometimes when you silently install applications, they can fail for whatever reason, and you will not be notified, and if the program continuously fails, you will NEVER know that your application is out of date.

Ketarin is a powerful program, and a program that saves you a large amount of time downloading and installing your applications. I suggest you use it.

6 comments:

Wow, thank you so much for this walk-through. I just uploaded Ketarin and have been looking for a post to explain what I do next... Also, thanks for mentioning that I have to check the applications myself, I wouldn't have known that. :)