Redirecting MakeBAT plugin settings

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
prorokrak
Junior Member
Junior Member
Posts: 9
Joined: 2011-04-17, 10:58 UTC

Redirecting MakeBAT plugin settings

Post by *prorokrak »

Is it possible to change the location of INI file of makebat plugin or at least redirect it?

I have TC installed in the Program Files folder. All plugins are installed in a TC subfolder. My TC settings are saved in my profile folder (Appdata\Roaming\Ghisler).

Since I usually run TC with standard user privileges, plugins cannot save their settings into their INI files located in a Program Files subfolder. Some plugins are able to save their INI files to my profile folder where are also saved settings for TC. However, I was not able to find a way how to make the makebat plugin save its settings into a different folder.

I have tried to change the makebat.ini which is saved in a Program Files subfolder to read:

Code: Select all

[oldstrings]
RedirectSection=%COMMANDER_INI%\makebat.ini
[options]
RedirectSection=%COMMANDER_INI%\makebat.ini
But it doesn't seem to work.

Is there any other solution except for reinstalling my plugins to a different (writable) location?

Thank you very much for your help.
User avatar
Dalai
Power Member
Power Member
Posts: 9389
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

RedirectSection won't work since the plugin's settings file is used by the plugin itself, not TC, and only TC uses RedirectSection. It could only work if the plugin supported some redirection mechanism.

There are several options:
  • Grant write permissions onto the plugin's settings file (makebat.ini)
  • Move the plugin's settings file to another location using a symlink
  • Reinstall TC to a directory users can write to
  • Reinstall the plugin to a directory users can write to
I think, the first option is the easiest to achieve and manage. I don't recommend the last two since everyone can write every file of the TC/plugin installation.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Redirecting MakeBAT plugin settings

Post by *nsp »

prorokrak wrote:Is it possible to change the location of INI file of makebat plugin or at least redirect it?

I have TC installed in the Program Files folder. All plugins are installed in a TC subfolder. My TC settings are saved in my profile folder (Appdata\Roaming\Ghisler).

Since I usually run TC with standard user privileges, plugins cannot save their settings into their INI files located in a Program Files subfolder. Some plugins are able to save their INI files to my profile folder where are also saved settings for TC. However, I was not able to find a way how to make the makebat plugin save its settings into a different folder.

I have tried to change the makebat.ini which is saved in a Program Files subfolder to read:

Code: Select all

[oldstrings]
RedirectSection=%COMMANDER_INI%\makebat.ini
[options]
RedirectSection=%COMMANDER_INI%\makebat.ini
But it doesn't seem to work.

Is there any other solution except for reinstalling my plugins to a different (writable) location?

Thank you very much for your help.
Reading the source code gives no clues about any redirect section !
TCBL can be used as an alternative to makebat, this is not a plugin just an external tool that build bat and execute them using alternate ini file you can use it to generate files without execution...
Post Reply