本帖最后由 jyswjjgdwtdtj 于 2023-8-11 17:12 编辑
- set w=createobject("wscript.shell")
- set a=w.exec("cmd")
- a.stdin.writeline "powershell -windowstyle hidden exit" ' 因为窗口被隐藏 可以知道这的确被执行了
- 'a.stdin.writeline "ftype"
- '一定得cmd窗口被关闭 才会执行下面的语句
- msgbox a.stdout.readall'cmd被关闭后 ftype的输出可以被正常获取
复制代码
事实证明 在exec中不可使用的是atendofstream和readall |