关于VB6 - 环境变量

时间:2013-04-01 09:35:56

标签: vb6

关于VB6: 我想使用环境变量调用1个批处理文件,我正在尝试下面的代码,但我认为有些东西缺少它为什么不能正常工作:

代码:

Dim sPathUser As String
sPathUser = Environ$("windir")
MsgBox sPathUser
Shell "sPathUser\test.bat"           ---> Here i m calling Batch file

那么,有人能帮帮我吗?

1 个答案:

答案 0 :(得分:3)

使用Shell sPathUser & "\test.bat"

相关问题