The problem arises when I try to use the same piece of code to restart the server. In the status dialogue box you can see that the restart command is being issues - however Silk hangs like this indefinately, even after the application has restarted, which means that the script is failing to finish.
Re: Hang with SYS_Execute function on remote server...
SYS_Execute wants to run synchronously so it is waiting for whatever is in sCmdLine to complete before moving on to the next line of 4Test. This means that SYS_Execute is not useful for starting something that doesn't run to completion immediately. I am not sure why whatever you are using to restart your server would work like this, but...
You can also try:
1) App_Start() // (use "bwcompat.inc")
2) MainWin.Start() // (See link below)
3) Calling ShellExecuteA in Shell32.dll
4) Using SYS_Execute to run a shortcut to your script. The shortcut always runs to completion, regardless of what it 'points to'.