SilkTest执行命令的函数是:SYS_Execute (), 语法格式如下:
iReturn = SYS_Execute (sCmdLine [, lsOutput])
参考SilkTest帮助文档
这里面我们使用fsutil fsinfo drives命令来显示所有的驱动器。
[ ] STRING sCmdLine = "fsutil fsinfo drives"
[ ] LIST OF STRING lsListDrivers = {}
[ ] LIST OF STRING lsOutput
[ ] SYS_Execute (sCmdLine,lsOutput)
[ ] INTEGER i=2
[+] while GetField (lsOutput[2]," ",i)!=""
[ ] ListAppend (lsListDrivers,GetField (lsOutput[2],"
",i))
[ ] i++
[ ] ListPrint (lsListDrivers)
没有评论:
发表评论