Shell 如何使用vbs脚本连接到VNC?
如何使用当前目录而不是静态目录连接到VNC服务器。 如果我使用-Shell 如何使用vbs脚本连接到VNC?,shell,vbscript,Shell,Vbscript,如何使用当前目录而不是静态目录连接到VNC服务器。 如果我使用-oShell.Run”“”C:\Users\Admin\Documents\SharpDevelop Projects\test\bin\Debug\tvnviewer.exe”“10.73.240.112”一切正常 Set oShell = WScript.CreateObject("WScript.Shell") Dim sCurPath sCurPath = CreateObject("Scripting.FileSyste
oShell.Run”“”C:\Users\Admin\Documents\SharpDevelop Projects\test\bin\Debug\tvnviewer.exe”“10.73.240.112”
一切正常
Set oShell = WScript.CreateObject("WScript.Shell")
Dim sCurPath
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
oShell.Run sCurPath & "\tvnviewer.exe" 10.73.240.112
WScript.Sleep 500
oShell.SendKeys "keepout" & chr(13)
请比较这两种说法。解决方案就在你的眼皮底下。。。。“&sCurPath&”“10.73.240.112”