I was wondering how you would get Ansicon working on Console2. Currently, tere is color when I run cmd.exe and colors show up (ie. Rspec).
BUT, i have tried to use Console2 (Settings, Tabs, Shell -> C:\Windows\System32\cmd.exe "C:/Ansicon/ansicon.exe", C:\Windows\System32\cmd.exe ansicon, etc... ) it just doesn't quite work. I have also tried variations such as "C:/Ansicon/ansicon.exe", but it shrinks up the Console2 window.
Now here's the kicker..... after I open a tab in Console2 and verify there isnt color, by running Rspec, I run "ansicon" again and execute the same command, and there would be color...
This might be a really simple question, but hopefully someone can point me in the right direction.
Thanks a lot in advance!
Your starting command must be
C:\Windows\system32\cmd.exe /k Ansicon -p
Also, why not to try ConEmu? It can ANSI internally.
Related
Dopusrt.exe /acmd Go "c:/"
The above command works, last active Window goes to c:/ but the below command does not work.
Dopusrt.exe /info documents\filelist1.txt,listsel,0
The weird thing is it works just fine in Windows Terminal. Does CMD reserve commas for something? I really need to use CMD in this case, Since Auotohotkey seems to only speak to CMD.
Thank you.
CMD and Windows Terminal are not the same type of application. CMD is a shell, and WT is a terminal. See this post for more details.
You can run any shell you'd like in WT - CMD, PowerShell, whatever.
CMD.exe does not by itself reserve commas (to the best of my knowledge). And running cmd.exe in WT vs running it in conhost (the default console on Windows) shouldn't make a difference either.
I've searched everywhere and I can't seem to find (what should be simple) a command that opens 2 cmder windows side by side:
And run my own commands in each one.
How can I do that using commands only?
I eventually found the answer in the ConEmu github pages (sort of) by using the -new_console:s flag.
start cmd /k "foocommand"
start cmd -new_console:s /k "barcommand"
Run the above commands from cmder and it works. The only problem is that it doesn't automatically open cmder, and you have to run it from cmder but at least it works. Starting a cmd from cmder opens a cmder automatically.
... ok since there is no "real" answer in here, I thought I'll post my solution:
if you execute the line below in a windows cmd (exchanging Cmder.exewith the path to the Cmder.exe) it will do just what you've asked for without having to mess around in the cmder gui
Cmder.exe /x "-run cmd" & Cmder.exe /x "-run -new_console:s cmd"
One can right click on the top of Cmder and do as shown below snapshot
How do i launch firefox from perl? i just need to launch the browser so WWW::Mechanize::Firefox can manipulate it. Searching around stackoverflow ive seen a few solutionsl like system('start cmd.exe /k $cmd) where $cmd is arguments to throw as input once cmd is started.
However, these have not helped me to solve my problem at all.
solutions ive tried
system("start cmd.exe /k start firefox");
system("firefox");
system("cmd","start","firefox");
system("cmd start firefox");
Basically a lot of the alternatives ive found, but i could not launch Firefox browser at all.
You're on the right track. Your second line is almost correct. If firefox is not in your PATH environment variable, you need to supply the complete path.
Click on the Firefox icon on your desktop, open the properties and check where the firefox executable is located. Then use that with your system call.
For me, it looks like this (the ' are for Perl's string, the " are for the Windows shell, because the path has spaces in it):
system('"C:\Programme\Mozilla Firefox\firefox.exe"');
You can test it by opening a new command line (win + r, cmd), cding to the directory where your Perl program is run from, and just entering the command:
C:\Dokumente und Einstellungen\simbabque>"C:\Programme\Mozilla Firefox\firefox.exe"
It will not print anything, but just open a new Firefox window after a couple of seconds. So you'd probably need to hold your program execution in Perl while the browser is starting up.
WWW::Mechanize::Firefox will launch firefox for you but you can use
system 1, qq{$ENV{PROGRAMFILES}\\Mozilla Firefox\\firefox.exe}
I'm using Windows7, and I installed Ruby on Rails with RailsInstaller. This comes with "Command Prompt with Ruby and Rails", which I think is just a regular cmd prompt that automatically starts Rails...
Anyway, the problem I'm having is that I cannot change the buffer size. I have changed the buffer size to 999 in the Options tab of the Properties, but to no avail.
I've done the same thing to the regular command prompt that comes with Windows and it worked.
So I solved my problem. I could get the buffer size working correctly in the regular Windows command prompt, so I just made another shortcut to that, and then in the Properties->Shortcut tab I changed Target to C:\Windows\System32\cmd.exe /E:ON /K C:\RailsInstaller\Ruby1.9.2\setup_environment.bat C:\RailsInstaller
Still not sure why changing Options on the cmd prompt that came with railsinstaller didn't work though...
When I type 'http://www.google.com at the Windows Run: prompt it launches my default browser.
But when I do it at the CMD or Commnad prompt it does not. I assume that there is some form of RunDLL command being issued but I can't find out what.
Does anyone have any insight?
I think it's the equivalent of using START.
If you try
START http://www.google.com
from the command line (or a batch file), it should work fine.
What Jon said appears to be correct. I tested it with mailto:someone#somewhere.com. Interestingly if you wish to make run work like the default behaviour of cmd, you can do the following:
Start -> Run -> cmd /c http://www.google.com. Not sure why anyone would ever need to do that though!