7

I'm running the headless interface of VirtualBox (VBoxHeadless.exe) with Ubuntu Server running on it. Every time I run VBoxHeadless, it starts a command prompt window which just sits on the taskbar taking space which could have been used by more useful programs.
I want to hide this non-functional command prompt window (minimize to system tray or anything that just removes it visibly). How can I do this? It would be really cool, if this can be achieved without installing any 'minimize to system tray' utility.

Any ideas??

2
  • 2
    If you give me the command line you want to execute (including full path to VBoxHeadless.exe and arguments) I can make a shortcut (.LNK file) for you that runs it with the console hidden.
    – Hugh Allen
    Mar 17, 2010 at 8:35
  • Here's the full path to the exe with arguments: "C:\Program Files\Sun\VirtualBox\VBoxHeadless.exe --startvm UbuntuServer"
    – detj
    Mar 17, 2010 at 9:44

6 Answers 6

7

Hidden Start, aka hstart, is probably what you're looking for. Use it to run VBoxHeadless.exe.

Console applications and batch scripts are regularly run at Windows startup and in schedule. The main inconvenience of this is that every application creates a new console window which flickers on the screen. Hidden Start (or Hstart) is a small startup manager that allows console applications to be started without any windows in the background and much more.

1
  • Wow...loads of thanks! HStart is a tiny marvel. Now, I can run VBoxHeadless...which is actually headless
    – detj
    Mar 17, 2010 at 9:41
5

I use VBoxHeadlessTray. It perfectly works for me.

VBoxHeadlessTray is simple windows app that runs a VirtualBox VM as a tray icon: enter image description here

1

Are you running the virtual server all the time? If so, you could consider setting that executable as a scheduled task to run whenever you turn the computer on. There should be an option for whether or not it can interact with the desktop; unchecking that will prevent the command dialog from showing up.

2
  • That's nice! But, I don't need to run it all the time. Just when I need to do some web development. I connect to the server using Putty. But, on second thoughts, if there seems to be no other way, running it all the time won't do much harm. +1 for ur genuine help!
    – detj
    Mar 17, 2010 at 7:18
  • What host OS are you using? I know that in Windows Vista and later, if the task is currently running, you can stop it from the scheduled tasks MMC plugin. This would allow you to start up and turn off your VM at will. It would not, however, be a clean shutdown, I don't think.
    – nhinkle
    Mar 19, 2010 at 8:15
1

CMDH can run a command line or a batch file in the background without popping up a CMD window. Works on Windows 2000, XP and 7.

Add a few of Horst Schaeffer's CMD dialog tools (Wselect, Wfolder, Wfile, Wbox, Wprompt, Winput, Wbusy) and all your bat/cmd files run smoothly in a GUI disguise.

0

I made you a shortcut: VBoxHeadless_hidden.lnk. It works on XP 32-bit. Other versions of Windows untested.

I did it by modifying the source code of cygwin's mkshortcut utility. In hindsight it would have been less effort just to use a hex editor on the shortcut file :)

BTW: if you bring up the property sheet for this in Explorer, it will incorrectly say "Run: Normal Window". If you make any changes this setting will be saved and the magic will be lost. (but you can always download it again)

4
  • Used your shortcut..the server runs, but the command window does not hide
    – detj
    Mar 17, 2010 at 17:28
  • I'm on Windows 7...can be a compatibility thing!
    – detj
    Mar 17, 2010 at 17:29
  • D'oh! I wonder if M$ put in some code to specifically ignore an nCmdShow value of SW_HIDE (ie. 0). Most of the time it wouldn't be what you wanted. Imagine accidentally running Notepad with its window hidden. Or Task Manager. Or Explorer :)
    – Hugh Allen
    Mar 17, 2010 at 18:13
  • Here is opensource tool that can start console app hidden. Works on windows-10.
    – Alex
    May 13, 2019 at 12:48
0

You can put commands in a a batch file and You can use VBscript to hidden start batch files:

CreateObject("Wscript.Shell").Run "Batch file path.bat args",0,True

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .