You can now start your virtual machine from the Services management console, Windows Service Commander or using net start from a cmd prompt. Double click the AppDirectory key and enter the path to the Virtualbox program directory in the Value data field ( c:\Program Files\Sun\xVM Virtualbox\).We use a port number that is not 3389 to not conflict with the windows rdp server if it is configured to be used. Double click the AppParameters key and enter /c "c:\Program Files\Sun\xVM Virtualbox\VBoxHeadless.exe" -startvm -p in the Value data field.Double click the Application key and enter c:\windows\system32\cmd.exe in the Value data field.Repeat the above step and create two more keys called AppDirectory and AppParameters.Type in Application in the Name field of the newly created key. Right click in the right window and select New -> string value from the menu.
Click on the newly created Parameters Key so it is highlighted. Click Edit -> New -> Key from the menu and create a new key called Parameters.Using regedit browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ and select the service you have just created (e.g.Click START -> Run and enter regedit in the runbox and click OK. The next step is to provide srvany with information about the program you want to run.If you look down the list in Windows Service Commander you will see your newly created service! Click Next twice (skip the Dependencies page) and click Finish. Set the startup options as you wish (defaults are good for now).Leave the LocalSystem account radio button selected and click the Allow service to interact with desktop checkbox.Virtualbox_Linux, a Display Name (which can be the same as the Service Name) and a brief description of the virtual machine. Leave the Service will run in it's own process radio button selected and click Next. In the Enter Path to the service executable: box, click Browse and browse to and select the c:\Program Files\srvany\srvany.exe file.this will start a wizard to help you set the service up.
Copy srvany.exe, Instsrv.exe and Instsrvw.exe from the archive downloaded in step 2 to the srvany directory.