ConEmu run {cmd} instead of cmd.exe - conemu

When I run cmd in the "windows start/search" then ConEmu opens with "C:\WINDOWS\system32\cmd.exe".
Then, if I open a new tab then it opens properly a new {Shell:cmd}
How can I set it up, that when I run cmd in the command line it should open a new ConCmu window with {Shell:cmd} by default?
This is what I get when I type cmd:

Related

Ionic start command from batch file

I want to create an application in ionic from a batch file, executing commands from a file named appgenerator.bat.
I have created the batch file but commands aren't recognized.
It works correctly when I enter the command at the Command Prompt, but not inside the file.
appgenerator.bat:
#echo %off
set nombreAPP=nuevaAPP2
set path=C:\Users\Antonio
ionic start %path%\%nombreAPP% blank
And this is the screen in cmd.exe (first I put "ionic" to probe that the command works and after "appgenerator" to start with my batch file)
I dont think that the problem is in system environment variables, because in the cmd window, work correctly.

conemu - new console in new window?

Is there a possibility to open a new console in the command line in new window with ConEmu?
cmd -new_console -flag for new window
I am looking for this flag from the screenshot.
There is no sense in using -new_console when you want to start new instance of ConEmu.
Just start ConEmu: https://conemu.github.io/en/ConEmuArgs.html
ConEmu64 -NoSingle -run cmd

How to keep typing in cmd after opening emacs with bat file

I have a bat file emacs.bat as shown:
#echo off
"C:\emacs-24.3\bin\emacs.exe" -q -l w:\handmade\misc\.emacs
After I run emacs.bat emacs opens, no problems. However cmd does not let me continue typing commands while emacs is open. I would like to be able to type commands into cmd with emacs open.
How can I achieve this?
The solution is to add start "emacs" to the beginning of the command in emacs.bat:
start "emacs" "C:\emacs-24.3\bin\emacs.exe" -q -l w:\handmade\misc\.emacs
"emacs" is required for the text for the CMD title bar.
You can also make it work without opening a new window by adding /B after "emacs".

how to execute cmd commands and compile it in a .bat file

Hello I'm getting sick from repeating commands in the cmd window so I want a .bat file that makes cmd opens then execute the command, and would be great if it's closed after executing the commands like example:
ipconfig/release
ipconfig/renew
Then closes the cmd window
Thanks.
Easy:
Put both commands in a text file, name it "new.bat".
Add a #echo off and a exit, and you are done:
#echo off
ipconfig/release
ipconfig/renew
exit
Every time, when you enter new, it will execute these commands.
And you can even do it with a double-click in WindowsExplorer.
You could save the .bat file to the desktop, so you can reach it easy with your mouse.

How to run multiple commands in cmd using a script

I have three different commands that I want to execute my running one script,
I created a file called as myscript.bat
I want the following two commands to run in sequence when I run the script:
cd C:\Users\johnDoe\Idea\View\Proxy
node proxy.js
PS:And after that I want the cmd to be left open, not close automatically
Leave the bat file as it is, but run it with cmd /k myscript.bat. Also, if there's a chance of the command window opening by default on another drive, you might want to add the line C: to the beginning of the script to change volumes. cd changes folders within a given volume, but it doesn't actually change volumes.
Alternatively, if you just want the window to stay open so you can read the output, but you don't actually want to run any additional commands in it after your commands finish, you can just add the line pause at the end of the script.
#reirab's answer contains the crucial pointer: use cmd /k to create a console window that stays open.
If you don't want to use cmd /k explicitly - say, because you want to open the batch file from Explorer, you have 2 options:
[Suboptimal] Add a cmd /k statement as the last statement to your batch file.
[Better] Write a wrapper batch file that invokes the target batch file with cmd /k.
For instance, if your batch file is startProxy.bat, create another batch file in the same folder, name it startProxyWrapper.bat, and assign the following content:
#cmd /k "%~dp0startProxy.bat"
When you then open startProxyWrapper.bat from Explorer, a persistent console window (one that stays open) will open and execute startProxy.bat.

Resources