--- a/main/trunk/utilities/platform/windows/rexxhide/rexxhide.cpp
+++ b/main/trunk/utilities/platform/windows/rexxhide/rexxhide.cpp
@@ -124,15 +124,16 @@
         LocalFree(argv);        // released the parsed argguments
         // call the interpreter
         result = pgmThrdInst->CallProgram(program_name, rxargs);
-        rc = 0;
+        // display any error message if there is a condition.
+        // if there was an error, then that will be our return code
+        rc = pgmThrdInst->DisplayCondition();
+        if (rc != 0) {
+            sprintf(arg_buffer, "Open Object Rexx program execution failure: rc = %d",rc);
+            MessageBox(NULL, arg_buffer, "Execution Error", MB_OK | MB_ICONHAND);
+            return -rc;   // well, the negation of the error number is the return code
+        }
         if (result != NULL) {
             pgmThrdInst->ObjectToInt32(result, &rc);
-        }
-
-        if (rc < 0)
-        {
-            sprintf(arg_buffer, "Open Object Rexx program execution failure: rc = %d",rc);
-            MessageBox(NULL, arg_buffer, "Execution Error", MB_OK | MB_ICONHAND);
         }
     }
     // return interpeter or