Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Start Application in Background

$
0
0

Hi,

Is there a way to start a programm in the background?

I want to run a VirtualBox in Headless mode without opening any window.

With a C#.Net Programm I archived it like this:

  myProcess.StartInfo.WorkingDirectory = @"C:\Program Files\Oracle\VirtualBox\";  myProcess.StartInfo.FileName = @"C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe";  myProcess.StartInfo.Arguments = string.Format("-s {0} -v on", args[0]); myProcess.StartInfo.CreateNoWindow = true;  myProcess.StartInfo.UseShellExecute = false; myProcess.Start();

Now I would like to do it with powershell, as I thought that it also should work as it is also .Net able ...

I used the Start-Process comand but I does not work.
I tried some combinations like this:

$str = @("-s","vmBox","-v","on");
Start-Process -FilePath "C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe" -ArgumentList $str -NoNewWindow -WorkingDirectory "C:\Program Files\Oracle\VirtualBox\"

But doing so, the program occupies the current powershell console and does not continue running when I close the terminal.

Is there a way to do so?


http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3030821-allow-connecting-to-test-controller-using-differen <-- Vote for connecting with any user to Test Contrtoller



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>