2014-05-21

IT/Tech: How-to start and stop VMWare Workstation 10

If you are working with Azure, latest the moment you are starting to run the service locally you will realize that it does conflict with a locally installed VMWare Workstation or VMWare Player. The following script has been tested with VMWare Workstation 10.x and should serve you 

  • as local script for your convenience or
  • as starting point for your own version of a start/stop script.
Step-by-step guide
  1. The Script
    VMWare.cmd
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    @echo off
    :BatchStart
    setlocal EnableExtensions EnableDelayedExpansion
    title C6?! VMware START / STOP
    echo.
    echo %date%-%time%
    echo C6?! VMware START / STOP
    echo.
    echo.
    if /i "%1" == "" (
        echo Commands expected START or STOP
        echo.
         
        goto EndBatch
    ) else (
        echo VMware starts with command "%1"
        echo.
    )
    :GoOn
    if /i "%1" == "stop" (
        echo.
        echo Stopping VMware...
        echo.
        net stop VMwareHostd
        net stop VMAuthdService
        net stop VMnetDHCP
        net stop "VMware NAT Service"
        net stop VMUSBArbService   
    ) else if /i "%1" == "start" (
        net start VMAuthdService
        net start VMnetDHCP
        net start "VMware NAT Service"
        net start VMUSBArbService
        net start VMwareHostd
    )
    :EndBatch
    echo ErrorLevel: %errorlevel%
  2. Simply store it as VMWare.cmd and run it with (local) Administrator priviliges, calling is VMWare start to start the Workstation or VMWare stop to stop it.

Icon
You need to run the script with (local) Administrator priviliges or your current user need to have the right to start/stop services.
* The following article was used as a base to this article here: http://picobit.wordpress.com/2009/04/21/vmware-workstation-65-stop-services/