powershell: how to launch a process in the background?

is there a way to launch a program in PowerShell but still have access to the shell?

e.g. when i do


PowerShell launches emacs, but as long as that emacs is still running, i don't have access to the shell anymore. (PowerShell ISE tells me “Already running a command. Please wait.”)

Am looking for something similar to unix's “emacs &”.


∑ http://xahlee.org/

Solution. 2009-09-17

Thanks. I got it to work.

# launch ErgoEmacs with latest source code and your own emacs customization
function ErgoEmacsLaunch
start-process "C:\Program Files (x86)\ErgoEmacs\bin\runemacs.exe" -ArgumentList "-Q", "--load=~\ErgoEmacs_Source\ergoemacs\ergoemacs\init.el", "--load=~\.emacs"

set-alias ee ErgoEmacsLaunch

∑ http://xahlee.org/

On Aug 4, 9:34 pm, "Alex K. Angelopoulos" wrote:
> Another option for external applications that may take over the console (as
> opposed to cmdlets/scripts that may returnPowerShelldata) is to start it
> as a process. InPowerShell2, you can use the Start-Process command. If you
> want to retain a connection to the process, use the -PassThru parameter:
> start-processe macs-PassThru
> Even if this is a consoleemacs, it will be spawned in a new window by
> default.
> In PS1, use this:
> [diagnostics.process]::Start("cmd")

No comments:

Post a Comment