If you launch an executable from within a cmd window using the Open Agent SilkTest hangs when you close the cmd window. For example as illustrated by the following code:

[-] testcase test1() appstate none
  [ ] list of string lsDirOut
  [ ] SYS_Execute("cmd /Q /K notepad.exe", lsDirOut)
Then you need to use the 'start' method within the SYS_execute command to prevent this hang from happening.

[-] testcase test() appstate none
  [ ] list of string lsDirOut
  [ ] SYS_Execute("start cmd /Q /K notepad.exe", lsDirOut)


If you require the command prompt to close when you close the application, modify the command string to read:-

[-] testcase test() appstate none
  [ ] list of string lsDirOut
  [ ] SYS_Execute("start cmd /Q /C notepad.exe", lsDirOut)