VMware Workstation

Each VM is configured via a GUI. The configuration is held in a flat text
file named winnetstandard.vmx or whatever filename with extention VMX. You
can open this file with notepad and change settings without the GUI such as
RAM used, ISO image to emulate a CDROM drive, etc. This is useful when the
VMs are run as a service as opposed to from the GUI where you can change
the settings graphically.h

Running VMware Workstation as Service

Run VMware Workstation as a service. Running VMware as a service allows the
virtual machine to run without regard to or needing a login session. The
service can be set to manual. Starting the service will start the VM, then
to reboot the host machine, you shut down the VMs via RDP first. Once the
host is rebooted, you can have the vmware service started automatically or
manually from services.msc or the command prompt / batch file, depending on
your configuration.

Each VM will have its own service name, such as vmware-host1, vmware-host2,
etc. You start each machine by starting each service you install.

net start vmwareservice
sc.exe \\hostname start vmwareservice


Steps to Configure VMWare Workstation as Service

Requires instsrv.exe and srvany.exe from the server resource kit.

run command prompt at: c:\program files\Windows resource kits\tools
instsrv VmwareService "C:\program files\windows resource kits\tools\srvany.exe"


Note: The quotes are necessary and must be entered around the last string.

01. Test the service by starting the “VmwareService”.
    The service should start then stop with the dialogue box shown below.

02. Close the window.

03. If the service started/stopped successfully skip to step 9.
04. If the service did not start the most likely cause is an incorrect path
    to srvany.exe. To check the path open the registry editor and check the
    VMware Service key.
05. [Start] – [Run] – [Command: regedit.exe]
06. Navigate to HKLM\System\Current Control Set\Services\VMWare Service.
07. [Double click] the string value “ImagePath” and correct any errors in the path.
08. Click [OK] and test again.

09. If not already open launch the registry editor. [Start] – [Run] – [Command:
    regedit.exe]
10. Navigate to HKLM\System\Current Control Set\Services\VMWare Service.
    Highlight the key “VMware Service” and [Right click] – [New Key].
    Enter [Parameters] (without the brackets) for the key name
11. Highlight the “Parameters” key and [Right-click] – [String Value].
    Enter [Application] (without the brackets) for the value name.
12. [Double click] "Application” and enter the command string as below including
    the quotes;
      " vmware.exe" –x " < vm hostname>.vmx"
    The "-x" must be in lower case.
    For example:
      VMware is installed in "g:\VMware\VMware Workstation"
    The Virtual machine is installed in "g:\VMware\Virtual Machines\VM001"
    The VM hostname is "VM001"
    For this example the command string would be (Including the quotes);
    "g:\VMware\VMware Workstation\vmware.exe" -x "g:\VMware\Virtual Machines\VM001\VM001.vmx"

13. If not already open launch the “Services” control applet. [Start] –
    [Control Panel] – [Administrative Tools] – [Services].
14. Locate the “VmwareService”, [Double click] then select the “Logon” tab.
15. Tick the check box next “Allow this service to interact with the desktop”.
16. Click [Apply] then [OK].



Quick Setup:

command prompt:
	C:\program files\windows resource kits\tools\>
	instsrv.exe VMware-VM1 "C:\program files\windows resource kits\tools\srvany.exe"


setup.reg
	Windows Registry Editor Version 5.00

	[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMware-VM1\Parameters]
	"Application"="\"c:\\program files\\vmware\\vmware workstation\\vmware.exe\" -x \"x:\\path\\to\\winnetstandard.vmx\""