I had a similar chalenge with starting my VMWare server. I solved this with an
Autohotkey Script (see below). Once it worked correctly, i compiled it to an executable and put a shortcut to my desktop.
Obviously you must adjust the script. It uses german texts and the vmware service names and an authentication dialog. But you should get the idea. If you need help, i'll help you.
serviceNames = Registration Service,Authorization Service,DHCP Service,NAT Service,Virtual Mount Manager Extended
services = vmserverdWin32|Registration Service,VMAuthdService|Authorization Service,VMnetDHCP|DHCP Service,VMware NAT Service|NAT Service,vmount2|Virtual Mount Manager
Gui, Add, Text,, Benutzername:
Gui, Add, Text,, Passwort:
Gui, Add, Edit, vUsername ym
Gui, Add, Edit, vPassw Password
Gui, Add, Button, default, OK
AskPassword:
Gui, Show,, Geben Sie die Logindaten ein
return ;
GuiClose:
ExitApp
ButtonOK:
Gui, Submit
RunAs, %Username%, %Passw%
; Check that the Login was correct
RunWait,hh.exe,,UseErrorLevel
If ErrorLevel=ERROR
goto AskPassword
p := 0
Progress, fs10 fm10 zy20
Loop, parse, services, `,
{
StringSplit, service, A_LoopField, |,
; MsgBox, 1, Parsing result, Service ID = %service1% `, Service Name = %service2%
; IfMsgBox Cancel
; ExitApp
Progress, %p%, Starte %service2%, Starte VMWare
runwait, sc start %service1%,,hide
p := p + 20
}
Progress, Off
RunAs ; Reset to interactive user
runwait,C:\PROGRA~1\VMware\VMWARE~1\vmware.exe
RunAs, %Username%, %Passw%
servicesToStop = vmserverdWin32|Registration Service,VMAuthdService|Authorization Service,VMnetDHCP|DHCP Service,VMware NAT Service|NAT Service,vmount2|Virtual Mount Manager,IISADMIN|IIS Admin
p := 0
Progress, fs10 fm10 zy20
Loop, parse, servicesToStop, `,
{
StringSplit, service, A_LoopField, |,
Progress, %p%, Stoppe %service2%, Stoppe VMWare
runwait, sc stop %service1%,,hide
p := p + 16
}
Progress, Off
RunAs ; Reset to interactive user
ExitApp