Running DOS Commands
You can run standard DOS commands in your QuickTest function using the VBScript. Windows Scripting Host Shell object (WSCript.shell). For example, you can open a DOS command window, change the path to C:\, and run the DIR command using the following statements:
Dim oShell
Set Shell = CreateObject ("WSCript.shell")
oShell.run "cmd /K CD C:\ & Dir"
Set Shell = Nothing
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16792402/viewspace-567253/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16792402/viewspace-567253/