Change %ComSpec% from cmd.exe to bash.exe [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Is it safe to change %ComSpec% from cmd.exe to bash.exe(installed with git-for-windows)?
Are there any pitfalls while changing this enviroment variable?

I would imagine that a lot of existing apps and scripts assume that %ComSpec% points to an interpreter that is compatible with cmd.exe/command.com. And by compatible I mean the command line arguments it supports, the internal commands it supports and the way it parses and executes batch files.
Make your own variable if you need one for your own scripts or just make sure the path to bash.exe is in %Path%. Expecting other applications to cope with Bash is not going to work out well in the long run...

Related

Is there a way to see what command are run on your computer? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I was wondering how I could see the actions that are done on my computer but on my cmd prompt.
For example: Imagine I click on the shortcut Google Chrome on my desktop, then this will appear on my cmd prompt (or anywhere else):
C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe
modulo the - and -- arguments but that was just for the example.
Thanks!
Try Process Monitor (also called ProcMon), filtered on ProcessCreate. It'll list every process that gets created, along with the arguments and lots of other useful information.

% sign in terminal command line rather than $ sign [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am using Terminal on MacOS. My main concern is that I’m commonly seeing command lines starting with the ‘$’ sign.
My command lines begins with a ‘%’ sign. Does this matter? If so, what is the reason?
The reason is that bash is no longer the default shell in macos. The default shell is now zsh which has certain advantages, such as floating-point operators.
You may set the Terminal default shell back to bash if needed. It's path is simply /bin/bash

cmd does not recognize any commands [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm on Windows 10, the cmd does not recognize any commands.
It return always:
"the name of the commande" is not recognized as an internal or external command, an executable program, or a batch file
after Google search, I found that I should modifiy the Path in Environment Variables to add this line bellow, but it does not resolve the problem:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
Someone please can tell me how can I resolve this problem?
Thank you
ls is NOT a standard Windows command! DIR is the Windows equivalent to ls.
To see a list of Windows supported command, enter help. The example output:
>help
For more information on a specific command, type HELP command-name.
ASSOC Displays or modifies file extension associations.
...

How can I get a list of all windows recognized executable extensions in cmd? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I want to get a list of all the file extensions that a windows machine will recognize as an executable.
I tried the following in command prompt:
echo %PATHEXT%
But all I got from that is:
.COM;.EXE;.BAT;.VBS;.VBE;.JS;.WSF;.WSH;.MSC
Which is not a complete list. It's missing things like:
.SCR;.REG;.VB;.VBSCRIPT
and so on.
If the extension is not in %PATHEXT%, then there is no association. If you just type the.vbs at the command line, you will be informed of same.
If you type cscript the.vbs, then the script will run; assuming cscript.exe is somewhere in the PATH variable.
In short, files such as .SCR;.REG;.VB;.VBSCRIPT are not actually executable. It is the association that is used to know which executable can run them.

run named .exe in subdirectory in windows cmd [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
Improve this question
I feel stupid for asking this, but here goes. In linux/mac, you can run an executable file in the shell, simply by writing its name. Can you do something similar in windows command line?
Example: I am in directory dir. I want to run a file a.exe in dir/subdir without changing directory to subdir, or writing subdir/a.exe. Is this possible?
You can using one of the following:
"subdir/a.exe"
subdir\a.exe
You mean you don't want the double-quotes of "subdir/a.exe"? Anyway, if you change to a backslash, it does work; i.e.
subdir\a.exe
It is possible. All you need to do is ensure that the directory in which a.exe resides is included on the path.

Resources