在java中调用VB脚本

java配合vbs启动完成提醒

  • 方式1:
String filePath=D:\\wellcom.vbs
Runtime.getRuntime().exec("cscript //NoLogo " + filePath); 
  • 方式2:
String filePath=D:\\wellcom.vbs
Runtime.getRuntime().exec("wscript.exe " + filePath); 
  • wellcom.vbs:
CreateObject("SAPI.SpVoice").speak"服务已启动"
posted @ 2023-06-27 09:41  浮生若梦z  阅读(157)  评论(0编辑  收藏  举报