conemu - new console in new window? - conemu

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

Related

ConEmu run {cmd} instead of cmd.exe

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:

Powershell ISE - how to start new tab by command

I have few old cmd/batch files that use start command to open new windows
If I am in powershell ISE, I was hoping they would automatically open in new tab, but it doesn't work that way
Is there a simple command I can replace "start" with to simply open new tabs? Just trying to reduce taskbar clutter
You can use $psISE automatic variable like in below example.
$NewTab=$psISE.PowerShellTabs.Add()
$NewTab.Files='C:\test.ps1'

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 generate key strokes from a batch file?

I want to create a batch file to do the following:
Start selenium server(webdriver-manager start)
Run Protractor tests(protractor conf.js)
Stop Selenium server()
This needs 2 different command prompts since webdriver-manager start will keep running and simultaneously the tests need to be executed
I have achieved the following so far. I have created a .bat file with the following contents:
start runTests.cmd
webdriver-manager start
Ctrl-C(**DOES NOT WORK**)
However, I am not able to figure out a way to shutdown the Selenium server(which is achieved by pressing Ctrl+C on the same window on which the webdriver-manager start command is executed)
You can generate keystrokes using VB Script, which can be called from a batch file.
I followed this post: http://www.w7forums.com/threads/f5-key-via-batch-file.18046/, substituting {F5} with ^{C} for Ctrl+C. So my file looks like:
Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys "^{C}"
You need to save this file with a ".vbs" extension.
I also found from this answer VBScript - switching focus to window using AppActivate how to set the focus to another window (which you know the title of). Doing this first, you can direct your keystroke to the appropriate window, so:
Set objShell = CreateObject("WScript.Shell")
objShell.AppActivate "Untitled - Notepad"
objShell.SendKeys "^{C}"
I experimented with an empty instance of Notepad, so you'll need to change the window title string appropriately. (Ctrl+C doesn't do anything in Notepad, but Alt+F4 closes it, so I used "%{F4}" to test it.)
Then you can simply call the VBS file from your batch file to run it.

Cmd window to close after opening process with .bat

I'm new with batch file and the code I'm using I had to find but it always opens cmd but doesn't close it after the program is open. I'm aware that it doesn't close because it's a window process and cmd doesn't close until after the window is closed. I would like to to close after it opens the window. Here is the code:
"C:\Program Files\Java\jre7\bin\javaw.exe" -Xmx1G -Xms1G -jar "Minecraft_Server.exe"
I've used many different ways close it like putting Exit at the end or putting cmd /c in front but that didn't work.
Update
The start command does not seem to work with multiple parameters.
Only solution I could come up with is creating a windowless executable that handles the executing with multiple parameters.
Original answer
I've tested the following and it works because Progra~1 is the a conversion of the Program files folder in oldskool 8 character style:
start c:\Progra~1\Intern~1\iexplore.exe -new -k "http://www.google.com/"
I cannot verify this because I do not have java, but it should work:
start C:\Program~1\Java\jre7\bin\javaw.exe -Xmx1G -Xms1G -jar "Minecraft_Server.exe"
However if more folders start with Progra then it could also be Progra~2, Progra~3 etc. You would have to try what works.

Resources