Forum Discussion
- Marsha_R
Champion Level 3
With cmd.exe running, the code below returns the users logged in, read the results and record it in the test log.
function functionName()
{
var p, w, txt, cnt, i, s;
p = Sys.Process("cmd");
w = p.Window("ConsoleWindowClass", "*");
w.Keys("qwinsta [Enter]");
txt = w.wText;
aqString.ListSeparator = "\r\n";
cnt = aqString.GetListLength(txt);
for (i = 0; i < cnt; i++)
{
s = aqString.GetListItem(txt, i);
}
}