How to add "run exe" to MENUITEM in WCMD.MNU?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
LumpiX
Junior Member
Junior Member
Posts: 2
Joined: 2016-10-27, 18:26 UTC

How to add "run exe" to MENUITEM in WCMD.MNU?

Post by *LumpiX »

Hello!

How to add MENUITEM in WCMD.MNU for execute external command/app?

Code: Select all

MENUITEM "name", "fullpath.exe"

Thanks
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

>>> How to add MENUITEM in WCMD.MNU for execute external command/app?


First add your command as "em_MyCommand" to the usercmd.ini .
Then use em_MyCommand like MENUITEM "My new command", em_MyCommand.



Find more info by searching for "usercmd.ini"
(e.g. there http://ghisler.ch/board/viewtopic.php?p=291895#291895)







For examples take a look at

Extended English Menus for Total Commander (by petermad)
http://www.totalcmd.net/authors/1223914.html


e.g.


wcmd_ext2_eng.ini (same technic as "usercmd.ini")

Code: Select all

[em_ext_calc]
cmd=calc.exe

[em_ext_notepad]
cmd=%SystemRoot%\notepad.exe


wcmd_ext2_eng.mnu (like "WCMD_ENG.MNU")

Code: Select all

POPUP "Windows &XP"
  POPUP "&Programs"
    MENUITEM "Calculator", em_ext_calc
    MENUITEM "Notepad", em_ext_notepad






More questions?
 
User avatar
petermad
Power Member
Power Member
Posts: 16134
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

You will have to make an em_command and use that in the menu

MENUITEM "name", em_fullpath

To make an em command run the internal command: cm_CommandBrowser (you can do that from the command line).

In the "Choose Command" dialog you go all the way down in the list on the left side where you select the item "usercmd.ini".

Here you can now click on the "New" button whereafter you give the command you are about to make with the name: em_fullpath.

In the "Change user command: em_fullpath" dialog fill in the field "Command:" with: fullpath.exe - the dialog is prety much like the dialog for making buttons on the button bar.

Now the menu item "name" will execute fullpath.exe when you click it.


In stead of using usercmd.ini to store your em_command you can also use the wcmd_XXX.ini file that corresponds to your wcmd_XXX.mnu file.

Then you just go all the way to the bottom of list in the left side of the "Choose Command" dialog where you should find the wcmd_XXX.ini item that corresponds to your wcmd_XXX.mmu file.

You can download my Extended Total Commander Menus (see link in my signature) - here you can see the use of hundreds of em_commands
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
LumpiX
Junior Member
Junior Member
Posts: 2
Joined: 2016-10-27, 18:26 UTC

Post by *LumpiX »

sadly it has to be set in another file
but the important thing is that it work :)

thanks
Post Reply