我想像VBoxManage startvm MyVM --type headless
服务(postgres、apache)一样在引导系统上运行这个命令。
我在互联网上发现这可能是解决方案,所以我尝试了所有这些版本:
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage.exe startvm MyVM --type headless"
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage startvm MyVM --type headless"
没有成功,所以我试图抑制命令的详细输出
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage.exe startvm MyVM --type headless > NUL"
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage startvm MyVM --type headless"
还是没有结果。所有这个版本都给我返回了1053错误。所以最后调用是在Path中添加Virtualbox命令
sc create "vboxMyVMService" binPath= "VBoxManage.exe startvm MyVM --type headless"
sc create "vboxMyVMService" binPath= "VBoxManage startvm MyVM --type headless"
抑制输出 …