Launch two External Commands on one button

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Spiderkeys
Junior Member
Junior Member
Posts: 53
Joined: 2015-04-07, 10:02 UTC

Launch two External Commands on one button

Post by *Spiderkeys »

I have searching everywhere for this, and im someone has asked it.

But what I basically like to do is launch two external commands with one button (one click)( without having to create yet another batch file.

Such as my Nirsoft Utilites, which I would like if it would launch a program with also it's included help (.chm) file at the same time.

Such as cports.exe (CurrPorts), and it's included help file.

I've tried editing the bar.ini file and appending "cmd3=C:\Utils\Nirsoft\NirSoft\cports.exe" to "cmd3=C:\Utils\Nirsoft\NirSoft\cports.exe & cports.chm", and even trying && also, it never works it always launches
just the first command.

Otherwise, I have to end up making a lot of batch files.
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Button bar: execute more than one command launch two tools

Post by *Stefan2 »

2Spiderkeys

Just use a DOS-Batch or a PowerShell Script as your command.
Then the world is open for you and you could even start all the Nirsoft Utility at once with one command.



If you want to do that with TC internal possibilities, create two user commands, which you can both execute from one button.

usercmd.ini
[em_Usercmd1]
cmd=first.exe
[em_Usercmd2]
cmd=second.exe


TC Button
Command: em_Usercmd1, em_Usercmd2


Alternatively you could just launch the application only, and press the F1-key to launch the CHM help afterwards.


---
http://ghisler.ch/board/viewtopic.php?p=287794#287794
http://ghisler.ch/board/viewtopic.php?t=42057&highlight=commands
http://ghisler.ch/board/viewtopic.php?t=41342&highlight=usercmd 
Spiderkeys
Junior Member
Junior Member
Posts: 53
Joined: 2015-04-07, 10:02 UTC

Post by *Spiderkeys »

I'm using your example here and now I got the general idea.
[em_TestMultipleCommands]
cmd=cm_HelpIndex, cm_About, cm_CommandBrowser, em_RunNotepad,em_usercmd

[em_RunNotepad]
cmd=notepad

[em_usercmd]
cmd=cd %appdata%
Unfortunately my user created commands here run fine serparately but as soon as I join them with a comma, I get File not Found error, and nothing launches. I'll keep trying...

But anyway those Utils you cannot press F1 for help, I have to locate the folder and run the .chm files from them.
User avatar
nsp
Power Member
Power Member
Posts: 1953
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Spiderkeys wrote:I'm using your example here and now I got the general idea.
[em_TestMultipleCommands]
cmd=cm_HelpIndex, cm_About, cm_CommandBrowser, em_RunNotepad,em_usercmd

[em_RunNotepad]
cmd=notepad

[em_usercmd]
cmd=cd %appdata%
Unfortunately my user created commands here run fine serparately but as soon as I join them with a comma, I get File not Found error, and nothing launches. I'll keep trying...

But anyway those Utils you cannot press F1 for help, I have to locate the folder and run the .chm files from them.
You should try to remove spaces before and after comma !
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Spiderkeys,

Code: Select all

cmd /c start C:\Programs\Procexp\procexp.exe && start C:\Programs\Procexp\eula.txt
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

You may try: ButtonBar eXtended
Post Reply