Svn vbscript中objSell.exec方法的运行时输入
我需要在vbscript中使用subversion命令行工具(svn.exe)作为Svn vbscript中objSell.exec方法的运行时输入,svn,vbscript,Svn,Vbscript,我需要在vbscript中使用subversion命令行工具(svn.exe)作为 cmd = "c:\Program Files\VisualSVN Server\bin\svn.exe " & "list " & "https://10.0.3.133/svn/MyRepos" Set oExec = objShell.Exec (cmd) OutPut = oExec.StdOut.ReadAll Wscript.Echo Output 但是这个命令需要运行时输入(
cmd = "c:\Program Files\VisualSVN Server\bin\svn.exe " & "list " & "https://10.0.3.133/svn/MyRepos"
Set oExec = objShell.Exec (cmd)
OutPut = oExec.StdOut.ReadAll
Wscript.Echo Output
但是这个命令需要运行时输入((R)弹出、临时接受(t)或永久接受(p))来接受证书
如何为objShell.exec命令提供运行时输入
注意:我已尝试使用SendKeys(),但不起作用
谢谢…这是我通常使用的:
Set WshShell = wscript.CreateObject("wscript.Shell")
WshShell.Run "cmd"
WScript.Sleep 100
WshShell.AppActivate "C:\Windows\system32\cmd.exe"
WScript.Sleep 100
wshshell.sendkeys """c:\Program Files\VisualSVN Server\bin\svn.exe"" list https://10.0.3.133/svn/MyRepos"
wshshell.sendkeys "{ENTER}"
WScript.Sleep 100
wshshell.sendkeys "P"