Jump to content
Ketarin forum

shawn

Moderators
  • Posts

    1,181
  • Joined

  • Last visited

Posts posted by shawn

  1. It's actually a problem with the context. Whenever you're going to use an external download agent you need to save the download URL as a different variable, then process it manually in the pre-update command, returning 3 to indicate the update was successful ("exit 3"), not within the post-update command since that only fires after the download URL is successfully downloaded. 

    When I need to parse a magnet URI I use Aria2. Here's an example:

    aria2c --bt-require-crypto=true --seed-time=0 --dir="{myDownloadPath}" "{magneturi}"
    exit 3

    Again, this has to be done in the pre-update command or you'll get the "invalid download URL" error.  Still, I use "http://example.com/" in there to avoid an error that comes in certain contexts, primarily during testing.

    As always, it's important to ensure that you're performing some form of version validation for your app or it'll run the pre-update command every time, resulting in a bunch of unnecessary bandwidth and false "update successful" indication. As long as you're using the "advanced\use the following variable as indicator for changes" value correctly you'll avoid this problem.

  2. can you share a screenshot or other information about the error you're seeing? i've been using Ketarin a *long* time and have never had it fail to complete an update check due to an error.

    i can only imagine what you're seeing is an error in an installation script. if that's the case you'll need to edit the installation script to behave and offer error trapping - which may not be possible for all packages

  3. it's possible, but appveyor is designed specifically to prevent this, so it's challenging even for the best of us. you'd need to build multiple variables in Ketarin to capture the version, release URL, script from release URL, then scalp that content for multiple randomly generated keys for the blob URL, which is where the data is actually located. Then download that. It would take quite a bit of time to work around the safeguards designed specifically to prevent this.

  4. is this an errant space in the command here or in your batch file?

    start "" /wait G:\Home\Ketarin.exe /database=G:\Home\ home_apps /log=G:\Home\filename.log

    vs

    start "" /wait G:\Home\Ketarin.exe /database=G:\Home\home_apps /log=G:\Home\filename.log

    If there are spaces in the path (unlikely at that position) then you need to quote the database parameter as so: 

    start "" /wait G:\Home\Ketarin.exe /database="G:\Home\ home_apps" /log=G:\Home\filename.log

    again, a space before the file name is extremely unlikely though.

  5. I use file redirection and logging all the time for troubleshooting this kind of thing. Change your commands from this:

    "C:\Program Files\7-Zip\7z.exe" x "{file}" -o"{file:directory}" -y
    copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools"
    copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools"
    copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools"

    To this:

    echo.Current directory: "%cd%">>\logs\ketarin.log
    echo."C:\Program Files\7-Zip\7z.exe" x "{file}" -o"{file:directory}" -y >>\logs\ketarin.log
    echo.copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools">>\logs\ketarin.log
    echo.copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexpl.reg" "D:\Haole Boy\$USB files and folders\$ Tools\$ Remote Tools">>\logs\ketarin.log
    echo.copy "D:\Haole Boy\$USB files and folders\$ Tools\Process Explorer\procexp64.exe" "C:\Tools">>\logs\ketarin.log

    It amounts to adding a new line above it all that documents the current working directory then adding "echo." to the beginning of every line, and ">>\logs\ketarin.log" to the end of every line.  Run it. Then open "\logs\ketarin.log" to see the exact commands that would have been run. This might help you figure out why it's misbehaving. Open a command prompt, switch to that directory, then run the commands and see why it's not behaving.

    For example, it could be that you're assuming the path that stuff is running from, and that's creating problems for you. Or it could be that you're running "7z x" when you really mean to run "7z e" - and this will show you exactly how that is causing problems. Good luck!

  6. Yes, it is. I don't have any current samples I can share, but I am doing this.

    You need to visit the google drive space, view source (and save it) then download the specific file you're after (waiting for the scan and, if necessary, click 'download anyway'). Then go to the downloads tab (CTRL+J) and copy the destination URL.

    Now go to back to the source and rebuild the URL based on the values from within the javascript source. Once you've figured out which parameters go where (leave the apparently random ones as is), build a regex pattern to capture each one and build the resulting download URL.

    I find that it's usually much easier to look for the data on another location.

     

  7. the functions are regularly updated. a single walkthru couldn't possibly cover every feature, which is why the forum exists. 

    the difference between "save to file" and "save in folder" is that in "save to file" you're explicitly giving the destination file a name, whereas in "save to folder" you're using the name of the downloaded file directly (some applications expect specific file names or patterns) as provided by the server.

  8. are you double-clicking the batch file or running it from a command prompt?

    have you tried running the command with full paths applied? (start "" /wait k:\Ketarin.exe /database=k:\home_apps /log=k:\FILENAME.log)

    please share the EXACT command line you're using as it appears in the batch file.

  9. @jokerfool, you didn't actually answer any of my questions or provide details about what happens when you run the commands i shared. change it to reference your actual database name and tell us what happens. if it doesn't work, please answer ALL of the following questions so we can help (if in doubt, provide more information than you think is necessary, not less):

    are you running it from a command prompt? a batch file? a shortcut?

    are you running the command from in the directory where ketarin is located, or is the ketarin.exe file stored in a different folder within the path?

    is the database file in the 'start in' or current directory?

    what are the 'start in' directory and current directory?

    have you tried running the command with full paths applied? (start "" /wait k:\Ketarin.exe /database=k:\home_apps /log=k:\FILENAME.log)

    what version of windows are you running?

    are network paths involved?

    is it being run as a standard process or elevated?

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

  11. based on the command line you've shared there are two possible issues.

    1) is "home_apps" the full name of the database, or is it actually to be "home_apps.db"? The full file name is required.

    2) assuming you're shelling it out using the start command, the syntax for start.exe should be:

    start "" Ketarin.exe /database=home_apps.db /log=FILENAME.log

    Start is a pain in that you always have to pass the window title as the first parameter or stuff just doesn't work. Empty quotes are the most common way of getting that done.

    And finally, I assume you're also aware that the log file will not be written until Ketarin is closed. If you're trying to generate the log then continue processing, you'll actually want to use the "/wait" parameter for start as well, as so:

    start "" /wait Ketarin.exe /database=home_apps.db /log=FILENAME.log

    "/wait" ensures that command processing doesn't continue until Ketarin is closed. This would allow the next line of your batch to read the log file, for example.

  12. Sorry for the delay in responding. This is the problem:

    <CheckForUpdatesOnly>true</CheckForUpdatesOnly>

    With this option selected, which equates to the application, Advanced settings, "Do not download, check for updates only" checkbox, it will -- as desired -- ONLY check for updates and NOT download new files, even if it discovers that a newer version is available. UNCHECK this box to enable it to download as well.

  13. i viewed your GIF. this is most likely a problem with the specific application (HiddeX). please share the Ketarin XML for that application and I'll investigate why it's not working. I suspect that what the website has (and what is in the "download" field) is *not* a unique file based on the version, but rather a "stub" or generic installation package that actually downloads the rest of the installation package during installation.

    To get the Ketarin XML: select the HiddeX application from the list and press CTRL+C. Return to this thread, click the "code <>" button, and paste the XML in there.

  14. Based on your description it's working as intended.

    Ketarin doesn't re-download files that are already downloaded. To do so would be a waste of resources. You can use the "force" option to make it re-download, but that's rarely necessary once you have your apps configured correctly.

    The default behavior is to check for updates and download updates if they are newer than what is already downloaded. To "check for updates only" click the chevron next to "update all" and select "check all for updates only, do not download."

    Some sites actually publish a stub instead of the real application, or don't have the new version published to the download URL when they change the version information, so you may experience problems where the version number is different but the actual content is not. 

    The biggest issue you are likely to experience from your message above is the "taking it somewhere else" and checking for updates. If the drive letter or path changes to your Ketarin cache then there's a good chance that there will be obscure problems with the downloads. Some files may be forced to download again, or, if the path in your output structure is invalid they will not be able to download at all. There are workarounds posted here to accomplish it anyway (such as remapping your USB to a different drive letter). Search forum for details.

  15. the first echo line is going to be problematic. any app name with an ampersand is going to create issues. as will other special characters. it also has embedded quotes which might create issues. I'd change it to this:

    echo.%date% - %time% // {appname:replace:&:^&} v{version:replace:&:^&} - "{file:targetpath}" >> "{root}\centralfiles\KetarinHistory.txt"
    echo.{category:replace:&:^&} /// {appname:replace:&:^&} {version:replace:&:^&} >> "{root}\centralfiles\Ketarinlog.txt"
    

    the swithmail line doesn't actually have an attachment.

    the errorlevel check is after ping, so it's checking the error status of ping NOT the error status of swithmail. 

    have you tried running ONLY the swithmail line on its own in a command prompt window? (no, it won't have the attachment, but it might report an errorlevel that tells you why it failed)

    to add an attachment you'll need to use this syntax -- note that i added "/test" so you could get a visual indicator of failure:

    SwithMail.exe /TEST /s /from "emailsender@gmail.com" /pass "myexactpassword" /server smtp.gmail.com /p 25 /to "emailreceiver@gmail.com" /subject "KetarinToolbox update" /attachment "{root}\centralfiles\KetarinHistory.txt" /body "All application has been updated, error is in the log file attachment."

     

  16. Did you test for the errorlevel? Did you run the command outside of Ketarin to determine if it's a path problem, or maybe a permissions problem, or get visual feedback?

    Please post a sanitized example of your swithmail command line - change ONLY the email address and password to a generic value (like "user@gmail.com" and "mypassword"). Leave server names, ports, path, and other values the same as they are. I'll test it my next visit to the forum.

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