vb执行dos命令

这是普通的步骤(添加tomcat系统服务的命令)cmdC:尀Documents and Settings尀Administrator>cd d:/test/binD:尀test尀bin>service.bat install结果:添加成功 这样在VB中执行shell "D:尀test尀bin尀service.bat install" 结果为:The tomcat.exe was not found...The CATALINA_HOME environment variable is not defined correctly.This environment variable is needed to run this program 请问如何才能一步一步的按照普通模式走?批处理可以吗?怎么编写?要在VB里运行的,谢谢大家了
2026年09月28日 02:56
有1个网友回答
网友(1):

tomcat.exe 应该在d:/test/bin 目录下面但你执行shell "D:\test\bin\service.bat install" 可能调不到tomcat.exe文件