vbs开机开启vmware wrokstation虚拟机脚本

Set WshShell = CreateObject("WScript.Shell")
'WshShell.Run chr(34) & "C:\Users\jack\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\vmstartup.bat" & Chr(34), 0
'单引号开头是注释
'字符串中两个引号表示一个引号
WshShell.Run "vmrun -T ws start ""G:\vms\gitlab\gitlab.vmx""",0,false
WshShell.Run "vmrun -T ws start ""G:\vms\gitlab-runner\gitlab-runner.vmx""",0,false
WshShell.Run "vmrun -T ws start ""G:\vms\dns\dns.vmx""",0,false
WshShell.Run "vmrun -T ws start ""G:\vms\frpc\frpc.vmx""",0,false
Set WshShell = Nothing

为什么不用共享虚拟机?因为冷启动的时候,虚拟机不会随主机启动,重启是可以的,这是个bug

你可能感兴趣的:(vbs开机开启vmware wrokstation虚拟机脚本)