thl1000 Posted October 23, 2006 Share Posted October 23, 2006 Hi, i have some probs with this part of code: # $a = Run(@ComSpec & " /c H:\Tools\psexec.exe \\server02 test.cmd", "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) While 1 $b = StdoutRead($a) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $b) Wend This code works fine if i call it standalone Calling it within a function (see code below), the while...wend part seems not to be executed... Func _VMACHINES() LOCAL $H = GUICtrlRead($HServer_List) LOCAL $a LOCAL $b If $H = "--------" Then MsgBox(0, "Fehler", "Bitte wählen Sie einen Host-Server aus!") EndIf $a= Run(@ComSpec & " /c H:\Tools\psexec.exe \\server02 test.cmd", "", @SW_SHOW, $STDOUT_CHILD) While 1 $b= StdoutRead($a) If @error Then ExitLoop GUICtrlSetData($V_List, $b, "--------") ;MsgBox(0, "STDOUT read:", $b) Wend GUICtrlSetState($VM_List,$GUI_ENABLE) GUICtrlSetState($BackUp, $GUI_ENABLE) EndFunc Does anybody has an idea how to get it working?? Link to comment Share on other sites More sharing options...
/dev/null Posted October 23, 2006 Share Posted October 23, 2006 Calling it within a function (see code below), the while...wend part seems not to be executed...how did you check if the while...wend part gets executed?CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
thl1000 Posted October 24, 2006 Author Share Posted October 24, 2006 I checked it using the message box regards Thomas Link to comment Share on other sites More sharing options...
/dev/null Posted October 24, 2006 Share Posted October 24, 2006 I checked it using the message boxis the code posted above the FULL source code?CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now