Stickies
« No log file when starting Bart from jump list »

Welcome Guest. Please Login or Register.
May 29th, 2017, 10:42pm


Click to go to the
Zhorn Software Web Site
Click to go to the
Knowledgebase

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: No log file when starting Bart from jump list  (Read 974 times)
John Smith
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 127
xx No log file when starting Bart from jump list
« Thread started on: Jul 12th, 2013, 08:27am »

More of an intrigue than a problem: if I start Bart with a specific .job file from the jump list on the Task Bar icon (Windows 8 - 64 bit) it runs the selected .job file OK. However it does not update the log.html and when I click on the balloon or File, View, Detailed log it says it cannot find the file. In the Bart folder there is a file called log.html but it's the previous one.

Every other method of starting a specific .job file works as expected; after completion I can use either method to view the detailed log file.

What have you got against jump lists? Or have I missed a setting (much more likely)?
User IP Logged

John Smith
Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3540
xx Re: No log file when starting Bart from jump list
« Reply #1 on: Jul 13th, 2013, 06:14am »

What's the current working directory at that point? If it's set to somewhere which Bart can't write to, no log file will be written.

You can find the CWD by running the app, and then using Process Hacker to examine the process. Double-click the bart.exe entry on the Processes tab in PH, and then on the General tab, look at the Current Directory field. What's that set to?

Tom
User IP Logged

John Smith
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 127
xx Re: No log file when starting Bart from jump list
« Reply #2 on: Jul 13th, 2013, 07:16am »

Hello Tom - that explains why the log file is not being written. When I start Bart from the jump list, the Current Directory is listed as C:\Windows\system32\

The Command Line that the jump list entry invokes is listed as "E:\Run\Bart\bart.exe" -file "E:\Run\Bart\EXTERNAL.job"

I presume (shakily) that the CWD is actually that of the command line rather than the program Bart.

Starting Bart by other means lists the CWD as E:\Run\Bart\ which is where it ought to be.

I find Bart so stable and the way I have it set up so reliable that viewing the log is necessary only on very rare occasions, when I get an error. Losing the ability to start it from the jump list would not break my heart but it is nice and slick if I could find a way to enable the log writing when starting Bart that way.
User IP Logged

John Smith
Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3540
xx Re: No log file when starting Bart from jump list
« Reply #3 on: Jul 14th, 2013, 05:54am »

I'll have to admit to not being very familiar with jump lists.

When you run an exe, Explorer set the CWD to be the same as the place the exe lives.

If you use a shortcut to run an exe, then the shortcut properties contain a place to set the CWD.

All executables have this concept of "where they are" on the file system, so that when they try to perform a relative file operation (like write to a log file), that file gets placed into the CWD. It could actually be regarded as a feature if you wanted to see it that way!

Can you right-click the Bart icon on the task bar, and then right-click the entry "Bart - sync backup tool" and alter the properties in there? Like I say, I'm not very familiar with jump lists.

Tom
User IP Logged

John Smith
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 127
xx Re: No log file when starting Bart from jump list
« Reply #4 on: Jul 14th, 2013, 08:30am »

I did several examples of looking at Properties as you describe. Files opened by Word or Excel from a Jump List are shown, in Process Hacker, to have a Current directory of d:\Users\John\Documents\ which is correct; it's the default for where I keep my files.

Just clicking the Bart icon on the Task Bar shows Command line: "E:\Run\Bart\bart.exe" and Current directory: E:\Run\Bart\ All these seem correct and the log file works OK.

job files opened from a Jump List have the Command line: "E:\Run\Bart\bart.exe" -file "E:\Run\Bart\xxxx.job" and the Current directory is shown as C:\Windows\system32\ and the log file does not work, obviously if it trying to write to the system32 folder. Opening Bart - without a specified file - gives a Command line of "E:\Run\Bart\bart.exe" and a Current directory of E:\Run\Bart\

The thought occurred to me that a difference was that Bart is not "installed" but run from its folder. This does not seem to be an explanation for the issue however. I tested the idea on another program that runs from its own folder and I pinned it to the Task Bar and then pinned a file to its Jump List. The result was a Command line of "E:\Run\cPicture\cPicture.exe" "D:\Users\John\Pictures\xxxx.JPG" and a Current directory of E:\Run\cPicture\ all of which is correct.

I also tried removing the file association of .job with Bart but that made no difference either.

This is far too much detail for the size of my query, but since I started I thought I might as well continue in case it adds to your Bart knowledge base and you find it useful.
User IP Logged

John Smith
Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3540
xx Re: No log file when starting Bart from jump list
« Reply #5 on: Jul 15th, 2013, 02:48am »

Hang on a moment - if the jump list manages to launch Bart with the "-file" parameter (which is not the standard way of telling an app to load a file) then it must have lifted that from something else you do.

Most apps load files like this:

winword.exe loadme.docx

Bart however uses:

bart.exe -file loadme.job

In order for this to have been added correctly to the jump list, Windows must have observed you launching Bart in this way. Does that seem right?

Tom
User IP Logged

John Smith
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 127
xx Re: No log file when starting Bart from jump list
« Reply #6 on: Jul 15th, 2013, 03:14am »

Yes, that's right. The first step was to pin Bart to the Task Bar (Windows 8 - 64 bit) in the same way as other programs.

When a program on the Task Bar is run and a file opened, that file appears in the "Recent" list which is displayed when I slide the icon up from the Task Bar. On that list is the pin icon which enables me to add the selected file to the "Pinned" list at the top.

Thereafter, I can slide up the icon and select a pinned file. In the case of Bart, it will be one a few files other than default.job which of course will open when the icon itself is clicked.

PS: just curious - why Process Hacker rather than Process Explorer which I have used once or twice in the past?
User IP Logged

John Smith
Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3540
xx Re: No log file when starting Bart from jump list
« Reply #7 on: Jul 16th, 2013, 5:30pm »

Process Hacker has that third "Network" tab, so it does everything that Process Explorer does (well at least everything I use PE for!) and more!

Tom
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls