Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make conemu open bat files on double click?

I have a home-server where I run a Development minecraft server, and have moved to conemu as a CMD replacement, Exept each time I want to start the server I need to CD to the DIR & run the start.bat. Is there a way I could create a shortcut to just double click to start the start.bat in conemu?

like image 369
GodsDead Avatar asked Aug 20 '14 13:08

GodsDead


People also ask

What program opens .bat files?

This means any text editor, such as Notepad, including in all versions of Windows, can open one for editing. To open the BAT file in Notepad, right-click it and choose Show more options > Edit from the menu (or just Edit in some Windows versions).

How do I open and edit a batch file?

Edit a batch file from within Windows Batch files are plain-text files, which means they can be edited as a text file by right-clicking the file and clicking Edit as shown in the picture. Once you've clicked edit, your default text editor opens the file and allows it to be modified.


2 Answers

Command line for the shortcut:

"C:\Program Files\Far Manager\ConEmu.exe" /cmd "\path\to\start.bat"

Or you could associate opening any batch file with ConEmu by modifying Windows registry:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"C:\\Program Files\\Far Manager\\ConEmu.exe\" /cmd \"%1\" %*"

Modify ConEmu paths to match your install location.

like image 188
Tauno Siitam Avatar answered Oct 19 '22 11:10

Tauno Siitam


Strange but I post similar question! No need updating registry, one of members posted an easier way:

Running bat file easier way

We simply need selecting:

Force ConEmu as default termimal for console application

like image 13
user5029 Avatar answered Oct 19 '22 13:10

user5029