can't run *.cmd script from F4 launcher (tcer)

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
rsk82
Junior Member
Junior Member
Posts: 8
Joined: 2011-09-08, 21:15 UTC

can't run *.cmd script from F4 launcher (tcer)

Post by *rsk82 »

it seems that this program has a bug when is given a CMD script, like that:
[Program_SciTe]
FullPath=wscite\scite.bat
Next when I click on a file that has to be opened with this script I got quick flash of command window, that says that path is not found. But it is indifferent to what is in the cmd script. If I put 'pause' in it the result is the same. So it looks as tcer has this bug.

The problem with scite I have is that it has to see SciTE_HOME environment variable to get SciTEUser.properties file and other config files to make it truly portable.

Are there any other, newer F4 launchers to try here ?
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, rsk82.

Which programme is "this programme"? Has it got a name?
Is it not more likely that the issue is that you have given a relative pathname where the parameter name strongly suggests it should be a fullname, i.e. something like C:\utils\wscite\scite.bat instead? I.e. drive plus full pathname plus scite.bat.
[Program_SciTe]
FullPath=wscite\scite.bat
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
rsk82
Junior Member
Junior Member
Posts: 8
Joined: 2011-09-08, 21:15 UTC

Post by *rsk82 »

"this program" is tcer, that is my question about other such F4 redirectors.

You could do experiment like this. Make config to a program like text editor or some other util and in its main dir, along with the exe make simple cmd one liner with name of the program

Then changing only the extension from exe to cmd makes tcer can't run the program. Tcer can take relative paths for exe's i don't see a reason it couldn't do that with cmd.

I don't want to give it full path name because it would make my total commander not portable. What if I plug in usb-stick and it it kick out in different drive letter. Absolute paths are evil.
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

rsk82 wrote:"this program" is tcer, that is my question about other such F4 redirectors.
.....
Then changing only the extension from exe to cmd makes tcer can't run the program. Tcer can take relative paths for exe's i don't see a reason it couldn't do that with cmd.
tcer launch editor executable and do not launch script ! This is clearly stated in the documentation and in the in sample file.
If you want to use script, you can launch cmd.exe as program and add additional CommandLineArg with /c <yourscript>. See the following sample...

Code: Select all

[program_log]
Fullpath=%windir%\system32\cmd.exe
CommandLineArgs=/c "d:\tools\Totalcmd\tools\tcer\sciteLog.cmd"
rsk82
Junior Member
Junior Member
Posts: 8
Joined: 2011-09-08, 21:15 UTC

Post by *rsk82 »

So if I must use absolute paths this is useless for me, this program could be made way better.
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

rsk82 wrote:So if I must use absolute paths this is useless for me, this program could be made way better.
tcer is small fast and does exactly what it should. Give a look at tcer forum topic..
You have alternatives:
- First use TC External viewer capabilities and edit TC Associations !
- Use Choice Editor, or F4Menu, ... or F4MiniMenu...
- Build your own and share it as Flint did with tcer
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

rsk82
You can use variables like %COMMANDER_PATH% and %COMMANDER_DRIVE%. Since TCER is started from TC it inherits those variables and uses current valid paths of the running TC instance. At the same time, using variables like %windir% or %ProgramFiles% does not make your configuration non-portable. To the contrary, they will always give you correct paths of the system you are working with.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Post Reply