Suppose I (or any running process) wanted to launch a shell in Windows (7) and issue a command, there are a number of options available. For example, one could:
- Bring up the start menu, type
cmd
, and hit Enter; - Launch the command prompt via a shortcut;
- Bring up the command prompt in a third party tool (such as Launchy), or;
- Issue some commands in Windows' Run tool (Win+R), which launches the prompt, issues the command and then returns
All of the above methods will (by default) launch cmd.exe
(usually located in the Windows\System32
directory).
Recently I have started to favor alternate command line shells, such as Microsoft's very own PowerShell. However, what frustrates me most about using these tools, is that I seem to have to go out of my way to launch commands through them by default.
Is there any way that I can replace the default behaviour of running cmd.exe
with another shell, such as PowerShell or Cygwin? Not only so commands that I might issue from the start menu or a launcher will run in that shell, but if other applications want to open a shell, it will open in said default shell.
To be clear, it'd be nice if there was some clean way to approach this (i.e. a registry setting or configuration option somewhere, rather than simply replacing the executable file).
cmd.exe
: I am not sure it is a good idea, however. See this article