Place "TasksRunner.exe" in a version-idependent folder

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
Today I installed the latest ZP version (5.29.2.0) and in this context I deinstalled some of the older installations of ZP (I had about 21 different ZP installations :D on the VPS).

I use the Windows scheduler for many projects to run. It calls the .bat files for the different projects created by ZP. After the update and deinstallation of the older ZP versions all of those projects stopped working. After inspecting I found out that ZP creates in the bat-file a "version specific" link to the TasksRunner.exe that starts the projects within ZP (C:\Program Files\ZennoLab\EN\ZennoPoster Pro\5.29.2.0\Progs\TasksRunner.exe). So the scheduled projects stopped working because they had an link to an old version (5.12.3.0) of Zenno's TasksRunner inside the bat file.

Wouldn't it be better to place the TasksRunner.exe in an version independent directory (e.g. User\AppData\ZennoLab) during the installation of ZennoPoster to avoid such troubles? And when creating a .bat-file for a project in ZP it better links to this directory (like C:\Users\Username\AppData\Local\ZennoLab\TasksRunner.exe).

This would save the time for updating/editing the bat-files for all projects.

Thanks.
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
We use a bot to create bat files who get the folder based on application running.
Код:
var p = Process.GetCurrentProcess();
string s = p.MainModule.FileName;
Regex r = new Regex (@".*Progs\\");
Match m = r.Match(s);
return m.ToString();
To work you will need add the follow line in own settings:
using System.Diagnostics;
 
  • Спасибо
Реакции: morpheus93

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
We use a bot to create bat files who get the folder based on application running.
Код:
var p = Process.GetCurrentProcess();
string s = p.MainModule.FileName;
Regex r = new Regex (@".*Progs\\");
Match m = r.Match(s);
return m.ToString();
To work you will need add the follow line in own settings:
using System.Diagnostics;

Sounds like a quite sophisticated solution. I will try to implement it for myself. Thank you for your appreciated help :-)
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)