以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  数据源连接  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=111654)

--  作者:有点甜
--  发布时间:2017/12/27 9:36:00
--  

你可以在beforeOpenProject执行代码

 

Dim p As new Process()
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.UseShellExecute = False \'关闭Shell的使用
p.StartInfo.RedirectStandardInput = True \'重定向标准输入
p.StartInfo.RedirectStandardOutput = True \'重定向标准输出
p.StartInfo.RedirectStandardError = True \'重定向错误输出
p.StartInfo.CreateNoWindow = True \'设置不显示窗口
p.Start()
p.StandardInput.WriteLine( "net use  \\\\192.168.1.240 密码 /user:用户名")
p.StandardInput.WriteLine("exit")