ip写到引号外面来,用字符串连接符 & 连接就可以了。
变量在引号里面不会被替换为对应的值的。
Dim WshShell
Dim ip
ip = inputbox("输入ip")
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run ("%comspec% /k telnet " & ip),1,true
ect("Wscript.Shell")
Do
NotAgain = 0
x=inputbox("请输入软件所在磁盘 ")
If x = "" Then
WScript.Quit
End If
strCommandLine = x & ":\电脑\系统软件\压缩工具\WinRAR.exe"
If (CreateObject("Scripting.FileSystemObject").FileExists (strCommandLine)) Then
objShell.Run(strCommandLine)
set WshShell = CreateObject("WScript.Shell")
WScript.Sleep 300
WshShell.SendKeys ""
WScript.Sleep 300
WshShell.SendKeys ""
WScript.Sleep 300
WshShell.SendKeys ""
Else
MsgBox "It doesn't exist!"
NotAgain = 1
End If
Loop While NotAgain = 1
'改了一下
瓦达比斯 比你妈是 好大哟都市