Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell 如何使用vbs脚本连接到VNC?_Shell_Vbscript - Fatal编程技术网

Shell 如何使用vbs脚本连接到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

如何使用当前目录而不是静态目录连接到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.FileSystemObject").GetAbsolutePathName(".") 
oShell.Run sCurPath & "\tvnviewer.exe" 10.73.240.112
WScript.Sleep 500
oShell.SendKeys "keepout" & chr(13)

请比较这两种说法。解决方案就在你的眼皮底下。。。。“&sCurPath&”“10.73.240.112”