Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Script detecting whether Thunderbird is running.

  • 5 件の返信
  • 1 人がこの問題に困っています
  • 6 回表示
  • 最後の返信者: louscience

more options

For a year or more, I have been using a vbs script that is supposed to automatically abort if it discovers that Thunderbird is running. The script has always done this by checking for the presence of the session.json file in the Thunderbird profile -- if session.json was absent, the script would abort because it knew that Thunderbird was running.

This morning, however, this feature began to fail every time -- session.json (both in the Profiles folder and in my individual profile subfolder) now remains in place, whether or not Thunderbird is running. The same thing happens with parent.lock.

Is this a change in Thunderbird (I'm using version 31.5.0, with Win 7/64), or is there something wrong with my particular setup? If my setup is broken, how do I fix it? And if this is the new normal, is there another way that my script can tell whether or not Thunderbird is running? Thanks in advance for your help.

For a year or more, I have been using a vbs script that is supposed to automatically abort if it discovers that Thunderbird is running. The script has always done this by checking for the presence of the session.json file in the Thunderbird profile -- if session.json was absent, the script would abort because it knew that Thunderbird was running. This morning, however, this feature began to fail every time -- session.json (both in the Profiles folder and in my individual profile subfolder) now remains in place, whether or not Thunderbird is running. The same thing happens with parent.lock. Is this a change in Thunderbird (I'm using version 31.5.0, with Win 7/64), or is there something wrong with my particular setup? If my setup is broken, how do I fix it? And if this is the new normal, is there another way that my script can tell whether or not Thunderbird is running? Thanks in advance for your help.

選ばれた解決策

You could try to delete Parent.lock. If its in use you get a error if not it will be deleted.

Those tools can help you: esp Pstools with PsExec. https://technet.microsoft.com/en-us/sysinternals/bb545027

この回答をすべて読む 👍 0

すべての返信 (5)

more options
more options

Thanks for the prompt reply.

The approach outlined in the article looks like it would detect TB my computer, but I doubt that it would work on a remote computer. (My backup script needs to know whether TB is running on the destination computer, as well.) The presence or absence of session.json can be checked remotely.

Is session.json no longer supposed to disappear when TB is running, as described in the TB documentation? If it is still supposed to disappear, how do I get it to behave properly again?

more options

I don't have the answer to that. Mine doesn't disappear either can you do anything to the remote device? Like having a script that you can start remote and that will give you the answer

more options

選ばれた解決策

You could try to delete Parent.lock. If its in use you get a error if not it will be deleted.

Those tools can help you: esp Pstools with PsExec. https://technet.microsoft.com/en-us/sysinternals/bb545027

この投稿は Gnospen により に変更されました

more options

I'm relieved that the failure of session.json to disappear is not limited to my machines -- it's apparently a change in the way Thunderbird normally handles the files. But I'm a little bit annoyed that the online documentation still says that they disappear. (http://kb.mozillazine.org/Files_and_folders_in_the_profile_-_Thunderbird).

Now that I know that my installation of Thunderbird is not broken, I have rewritten my script to attempt to delete parent.lock. I had been under the impression that parent.lock was also supposed to disappear, but the fact that it varies between locked and unlocked is good enough. And I prefer using something intrinsic to Thunderbird than the temporary workaround I had been using -- having my TBird-launching script copy a certain file onto the desktop upon launch, and delete it after Thunderbird closes, so that my backup script could check for the presence of the file.

Thanks for the idea.