Jump to content
Ketarin forum

Update & Install Doesn't Recognize "Check for Updates Only" was run without actual download

Recommended Posts

If I run "check for updates only" without downloading to review the number of changes, and then proceed with update and install on entries that show update available, it doesn't actually download the entry and then install. It seems this "check for updates only" is updating the version or other status flag so the update isn't recognized as still needing to be downloaded. 

Link to post
Share on other sites

I have a similar problem with the portable version of Ketarin and it is reproducible.

'Check all for updates only, do not download' on computer A and download new version manually. Connect your thumb drive / external HD to computer B and re-run 'Check all for updates only, do not download'. It shows all the previous downloaded applications as Update available'. Trying to download them again manually ends in status 'No update'. If I re-run 'Check all for updates only, do not download' again right after the first run and there is a new update for another application, the same happens to me as you described above. Trying to download the found update ends in status 'No update' but it shows the new version number.


Oh and at the first run of Ketarin on the next computer, Ketarin does not delete the previously downloaded files. It keeps the last version. If I re-run the update/download a second time on the same computer the 'Always delete previously downloaded file' option works fine.


Another weird behavior is the missing/disabled 'Open folder' context menu for random application entry. After each update check a different application is affected.


Link to post
Share on other sites

@g00p3k: This is commonly because the version tracking information has changed (advanced, "use this variable as indicator for changes") but the actual download URL is either the same file, invalid or otherwise broken. This happens in some situations I've seen where the URL pattern is suddenly different, or the URL itself wasn't changed on the release page, even though they updated the version information.


@Necrox: Ketarin tracks the previous downloads based on it's **full path**, including drive letter, as well as other properties. If you are running Ketarin on a different device and want it to persist settings to be able to remove previous versions, it's important that the FULL PATH to your Ketarin installation and file cache be exactly the same. For this reason I personally use "K:\_Ketarin" as the root for all my Ketarin-related stuff, including the file cache. On alternate devices you can use diskpart or Disk Management to change the drive letter of your USB / removable drive, or map the shared drive using your preferred letter and name. Just make sure you're consistent above all else.


You can use a batch stub to load Ketarin and if the current path isn't correct, warn and/or exit. 


if /i not "%~dp0"=="k:\_ketarin" goto warning
Link to post
Share on other sites

My solution for the moment:


start.bat (creates a temp file on the system drive to start ketarin with the new, pre-defined drive letter)


REM BatchGotAdmin by Evan / EneergE: https://sites.google.com/site/eneerge/scripts/batchgotadmin
:: BatchGotAdmin
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    exit /B

    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
    ECHO Administrative rights granted.

cd /d %~dp0

set driveletter=P
set ketarinstarter=%SYSTEMDRIVE%\ketarin.bat
set ketarinpath=%driveletter%:\KETARIN\ketarin_fulldb.bat

echo select volume %cd:~0,1% > selectdrive.txt
echo assign letter=%driveletter% noerr >> selectdrive.txt

echo PING -n 5 localhost > NUL > %ketarinstarter%
echo %ketarinpath% >> %ketarinstarter%

START "" %ketarinstarter%

chcp 850>nul

diskpart /s selectdrive.txt

chcp 1252>nul

ketarin_fulldb.bat (opens ketarin with the pre-defined drive letter)


set ketarinstarter=%SYSTEMDRIVE%\ketarin.bat

cd /d %~dp0

set year=%date:~6,4%
set yr=%date:~8,2%
set month=%date:~3,2%
set day=%date:~0,2%
set hour=%time:~0,2%
set hour=%hour: =0%
set min=%time:~3,2%
set sec=%time:~6,2%

START ketarin.exe /database=all.db /export=Backup\all-%year%-%month%-%day%_%hour%%min%%sec%.xml
PING -n 5 localhost > NUL
START ketarin.exe /database=all.db /log=Logs\log-%year%-%month%-%day%_%hour%%min%%sec%.log
PING -n 5 localhost > NUL
REN all.db_*.bak all.db_%year%-%month%-%day%_%hour%%min%%sec%.bak
MOVE /Y all.db_*.bak Backup

del /s selectdrive.txt
del /s %ketarinstarter%

START "" ".\Downloads"

Link to post
Share on other sites
  • 2 weeks later...
  • 2 years later...

The batch file might be used on a flash drive and running on different systems with different regional settings and the date/time variables could vary.

One possible solution is using powershell:

Get-Date -Format yyyy-MM-dd_HHmmss

Untested edit:

ketarin_fulldb.bat (opens ketarin with the pre-defined drive letter)


SET ketarinstarter=%SYSTEMDRIVE%\ketarin.bat
SET pshellexe=%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe

cd /d %~dp0

IF EXIST %pshellexe% (
	FOR /F %%G in ('%pshellexe% -Command "Get-Date -Format yyyy-MM-dd_HHmmss"') DO SET datetime=%%G

START ketarin.exe /database=all.db /export=Backup\all-%datetime%.xml
PING -n 5 localhost > NUL
START ketarin.exe /database=all.db /log=Logs\log-%datetime%.log
PING -n 5 localhost > NUL
REN all.db_*.bak all.db_%datetime%.bak
MOVE /Y all.db_*.bak Backup

DEL /S selectdrive.txt
DEL /S %ketarinstarter%

START "" ".\Downloads"



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.