New environment for wcx_ftp.ini
Moderators: Hacker, petermad, Stefan2, white
Hello, petermad.
I explicitly support the request of introducing an additional %COMMANDER_FTP_INI% variable - or whatever the variable name will be. And I admit that the posted code may be considered a dirty little hack which will not work in all situations. It was not meant to be an argument against the requested variable.
Kind regards,
Karl
I explicitly support the request of introducing an additional %COMMANDER_FTP_INI% variable - or whatever the variable name will be. And I admit that the posted code may be considered a dirty little hack which will not work in all situations. It was not meant to be an argument against the requested variable.
Kind regards,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 11.50 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
2karlchen
I didn't think so, sorry if my report sounded like that. I was just trying to add some extra arguments FOR the requested variable.It was not meant to be an argument against the requested variable
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
-
- Junior Member
- Posts: 22
- Joined: 2011-11-29, 14:40 UTC
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
-
- Junior Member
- Posts: 22
- Joined: 2011-11-29, 14:40 UTC

License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
I also need %COMMANDER_FTP_INI% it is useful like %COMMANDER_INI%
Therefore, a spayware using few lines of code can easily get all wcx_ftp.ini that are not in TC folder or in other place than the one in the registry.
If you think starting TC with /f param will make it difficult to know the place of wcx_ftp.ini, here you are a very simple vbscript which will listing all TC instances and the command line used to launch it.ghisler(Author) wrote:There is no reason for programs to access the wcx_ftp.ini, except perhaps for stealing unencrypted passwords...
Code: Select all
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("Select * from Win32_Process " & "Where Name = 'totalcmd.exe'")
For Each objProcess In colProcesses
msg = msg & objProcess.CommandLine & vbNewLine
Next
MsgBox msg
@Ghisler
It is very frustrate to ignore your users request specially when it is simple and will not take a lot of time to implement (just one call to SetEnvironmentVariable at TC startup).
You have implemented %Commander_EXE% too fast, why not do the same for %COMMANDER_FTP_INI% - for me, it is much important.
What do you need more to convince you?
It is very frustrate to ignore your users request specially when it is simple and will not take a lot of time to implement (just one call to SetEnvironmentVariable at TC startup).
You have implemented %Commander_EXE% too fast, why not do the same for %COMMANDER_FTP_INI% - for me, it is much important.
What do you need more to convince you?
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, I don't want to clutter the relatively limited environment variable space with mostly unnecessary variables. Just use %COMMANDER_INI%, and if the ftp ini isn't in the same spot, ask the user.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
A workaround could be using a batch file to set %COMMANDER_FTP_INI% then launch TC with it
1- Copy the following code and save it in a text file with extension cmd (change the path of TC and the path/name of wcx_ftp.ini to meet your case)
2- After saving the file, create a shortcut for it on your desktop.
3- Show property dialog for the shortcut and choose Run: Minimized (to prevent the flicker of the cmd.exe black window when running it )
4- Change the icon of the shortcut to TC's icon
Now, each time TC starts by this shortcut, it will inherit %COMMANDER_FTP_INI% and all programs start from that TC instance will inherit it too.
1- Copy the following code and save it in a text file with extension cmd (change the path of TC and the path/name of wcx_ftp.ini to meet your case)
Code: Select all
Set COMMANDER_FTP_INI=C:\Totalcmd\my_ftp.ini
Start C:\Totalcmd\Totalcmd.exe /f=%COMMANDER_FTP_INI%
3- Show property dialog for the shortcut and choose Run: Minimized (to prevent the flicker of the cmd.exe black window when running it )
4- Change the icon of the shortcut to TC's icon
Now, each time TC starts by this shortcut, it will inherit %COMMANDER_FTP_INI% and all programs start from that TC instance will inherit it too.
-
- Junior Member
- Posts: 22
- Joined: 2011-11-29, 14:40 UTC
I searched for this before and found creating a shortcut is the best solution because other solutions require using external tool or use vbscript to run the batch.george60120 wrote:Is there any way to prevent the flicker of the cmd.exe black window without creating a shortcut to the batch file?
Another solution could be drag the batch file to TC button bar and check the option "Run minimized"