Jump to content
Ketarin forum

Installed version check


Guest Proxx
 Share

Recommended Posts

Hi There,

 

i have just discovered ketarin and i find it very useful.

when installing and updating applications on different pc this tool is perfect!

 

there is only one option i would like. an installed version check.

when you add a regkey which contains the version it will check if the installed version is older then the downloaded one and then updates it!

 

this can be achieved with the version key of the installed program. or just create a ketarin regkey which contains the versions of installed programs

 

Thanks in advance!

Link to comment
Share on other sites

Ketarin is designed to be ultra-portable. No registry keys and nothing tying it to an individual computer (unless you're storing the database in AppData). Relying on a Ketarin-based registry key to be remotely current when it's not the only way of installing an application would introduce all sorts of problems.

 

In any case, this can be done effectively with a pre-update script or during the installation script using various tools that are available. For example, you can use nircmd to read registry information if the version number is stored there, or C# (native within Ketarin) to read from a standard file (such as the exe), or you can use a tool I wrote several years ago for similar functionality, Versions.

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

I actually made this already. If you want a rundown what it does is check the executable timestamp along with a custom file timestamp that is created whenever the install instructions are run. If there is a disparity then it runs the install instructions, woof.

 

These are all seperate 'custom commands' that you add in the 'setup' tab, they are always executed 'in order' so make sure they are organized. When you make custom commands there are little green arrows next to them so you can move them up/down the list.

::This first part of the script determines if an install is necessary
MD "{temppath}{appname:regexreplace: \(.*\):}\"
::This part of the script determines if the file downloaded is 'newer' than the last time an install was performed
REM The XCOPY /D tag compares "modified time stamps"
IF EXIST "{root}Programs\{category}\{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-LastInstall.txt" XCOPY /L /D /Y "{file}" "{root}Programs\{category}\{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-LastInstall.txt" | FINDSTR 0 && ECHO NO>"{temppath}{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-NotNew.txt"
IF EXIST "{temppath}{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-NotNew.txt" EXIT
::All your install commands should go here, the line directly below just checks to see if it should skip install instructions or not
IF EXIST "{temppath}{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-NotNew.txt" EXIT
::Cleanup and update last install time command, this should be the last command run
IF EXIST "{root}Programs\{category}\{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-NotNew.txt" DEL /F /Q "{root}Programs\{category}\{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-NotNew.txt" & EXIT
ECHO %DATE%>"{root}Programs\{category}\{appname:regexreplace: \(.*\):}\{appname:regexreplace: \(.*\):}-LastInstall.txt"
RD /S /Q "{temppath}{appname:regexreplace: \(.*\):}\"
&
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.