PDA

View Full Version : Calling EXE (With Return Code)



NewsArchive
05-14-2008, 02:22 AM
I have a SB script that calls an EXE (works file).

I am doing some processing in the EXE, and than closing the app with a
HALT(1)

Shouldnt the variable SB_RETURN capture what i am returning from the EXE?

TIA

Tim

NewsArchive
05-14-2008, 02:22 AM
Tim,

> I have a SB script that calls an EXE (works file).
>
> I am doing some processing in the EXE, and than closing the app with a
> HALT(1)
>
> Shouldnt the variable SB_RETURN capture what i am returning from the EXE?

HALT(1) passes the value 1 to the operating system, setting the DOS
ERRORLEVEL.

To retrieve the "DOS" ERRORLEVEL, you have to check the %_SB_ERRORCODE%
return value.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-14-2008, 02:23 AM
Perfect - AGAIN.

Thank you.

Tim

NewsArchive
05-14-2008, 02:23 AM
Tim,

IIRC, you can RETURN(retval) from your application without using HALT( ) to
return the parameter for a successful exit. HALT is a bit 'ungraceful'.

--

Ben E. Brady
Want MASSIVELY OUTRAGEOUS web disk space and bandwidth?
500 GB disk space and 5000 GB transfer per month,
http://www.servage.net/?coupon=CUST13495

www.clariondeveloper.com
www.singularvisionsoftware.com

The information contained in the message above, as expressed by the author,
is copyright 2008 by Ben E. Brady, All rights strictly reserved worldwide.
The information contained in the message above may not be posted on any
other information forum or web site without the express written permission
of the author. All opinions expressed in the message are those of the author
and are not necessarily shared by other members of the newsgroup and may or
may not be in agreement with SoftVelocity, the host of this newsgroup.

NewsArchive
05-14-2008, 02:24 AM
I didnt know you could do that with an EXE. I knew you could with a DLL.

Tim