以文本方式查看主题

-  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=154103)

--  作者:hb8888
--  发布时间:2020/9/3 17:32:00
--  请教打开外部程序用管理员身份运行
大师:请问如何用代码打开一外部程序时,指定以管理员身份运行?
--  作者:有点蓝
--  发布时间:2020/9/3 17:41:00
--  
Dim p As new Process()
p.StartInfo.FileName = "c:\\xxx.bat"
p.StartInfo.Verb = "runas"
p.StartInfo.WorkingDirectory = "c:\\"
p.Start()

--  作者:hb8888
--  发布时间:2020/9/3 18:19:00
--  
谢谢!