Jump to content
Ketarin forum
  • Announcements

Recommended Posts

shawn   

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.

Share this post


Link to post
Share on other sites

This command wont work because it doesn't have a trailing .db

 

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

Its just

home_apps

It also produces an empty result if I try and add the .db onto the end of it.

 

Also the backup file thats created its usually 1.4MB and now its only 21k

 

 

 

 

Share this post


Link to post
Share on other sites
necrox   

This one of my old scripts but still working. Try this:

 

@ECHO OFF

cd /d %~dp0

SET CURHOUR=%CURHOUR: =0%
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%

ECHO .
ECHO STARTING KETARIN...
START ketarin.exe /database=home_apps.db /export=home_apps-%year%-%month%-%day%_%hour%%min%%sec%.xml
PING -n 5 localhost > NUL
START ketarin.exe /database=home_apps.db /log=log-%year%-%month%-%day%_%hour%%min%%sec%.log
PING -n 5 localhost > NUL
REN home_apps.db_*.bak home_apps.db_%year%-%month%-%day%_%hour%%min%%sec%.bak

EXIT

 

Share this post


Link to post
Share on other sites
necrox   

The first command opens Ketarin, performs a database export as XML and closes Ketarin.

The second command starts Ketarin with the specified database.

Regarding your problem. Where is your database file located? Is your database in the same folder as the EXE? Does another database exist in %AppData%?

Share this post


Link to post
Share on other sites

So when I run that command this is what happens and yes the database is in the same directory as the exe

I run the batch file, Ketarin opens, the cmd window closes, this file is created home_apps.db_2017-08-19.bak

I close Ketarin and that's it. So nothing is exported to XML

Nothing in the AppData folder

I also don't get any file created ending in .log.

 

 

Share this post


Link to post
Share on other sites
shawn   

@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?

Share this post


Link to post
Share on other sites

I am running the command from a batch file

Yes running the batch file from where Ketarin is located

Database is in the same directory next to batch and ketarin

Windows 10 Home

No networks

Standard process

Share this post


Link to post
Share on other sites
shawn   

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.

Share this post


Link to post
Share on other sites

I double click the batch file

Contains:

@ECHO OFF

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

It loads the file, Ketarin opens, it creates a log file but the log file is empty. I leave Ketarin open for awhile in case too many apps, but it seems if I have 500 or 5 the log file is still empty. What am I missing here, can't be this hard.

I also checked the log permissions and changed the permissions so its full control and not read only.

It doesn't seem to make a difference if the file is home_apps or home_apps.db

It creates the log file just nothing is written to it.

I've also tested from a command prompt and elevated and same thing. Thanks for trying to help me.

 

 

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


×