RUNAS ]
/smartcard program
program EXE. 的命令行。请参阅下面的例子
你要执行批处理,要就以runas启动cmd.exe,然后把你的批处理路径当参数传递给cmd.exe
本地执行时用户写名字就可以了
其实你这样的解决方法最好使用wsh中的wshscriptexec对象,大概如下
Dim
Set wsh=CreateObject("WScript.Shell")
Set oexec=wsh.exec("cmd.exe")
oexec.StdIn.Write "runas /user:administrator install.cmd" & vbCrLf
oexec.StdIn.Write "pws" & vbCrLf