Run Program returns -11 or 256 as Return Result in Variable

Got a problem you cannot solve? Try here.
Post Reply
voiid
Posts: 9
Joined: Mon Nov 24, 2008 10:24 am
Location: Germany
Contact:

Run Program returns -11 or 256 as Return Result in Variable

Post by voiid »

No matter if I use Run-Program or Run-Program-As, the return result variable always contains only 256 or -11. I tested it with 3 different win32 console exe. I have to use a company tool which determines specific settings on customer machines. It returns an integer value between -2 and 6 depending on certain criterias. When I test the app with a batch file (ECHO %ERRORLEVEL%) it returns 2 for this development machine. As soon as I call this console app via Run-Program in the installer it retuns 256 or -11 but non of the values it should return. I updated my IA Studio version up to 8.01 but no change. I can't rewrite the app to make it an IA plugin, too much source hanging behind. I written a cheap console exe myself, which should simply return an (INT 13), but same FX.
Does anyone have experience with that issue?
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
voiid
Posts: 9
Joined: Mon Nov 24, 2008 10:24 am
Location: Germany
Contact:

Reason found!

Post by voiid »

Stay away from localization, I knew that it often causes trouble if you change certain parts in your script without re-localizing.

After the complete removal of the translations, the variable check and the run program return value problem was solved!

I tried to have a german and english setup, but right now, english only is the only way for me to solve the problem.

And yes .. I did, re-translate after all changes, but didn't work.
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Post by ulrichard »

:-)

What I ended up doing is often copying some statements (like if's). And then delete the original. So the new one is not translated until the next translation run.
What happens often is that you change a value to check against in an if statment, which can also be the name of a variable. So you look at the code and think it compares against variable aaa, but behind the scene in the translation it still compares agains some old variable bbb.
I don't understand why if-statements have to be translated anyway.
There are some options regarding the behavior of the translations. I didn't find proper documentation to it, and didn't have time to play with it though.

Rgds
Richard
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch
voiid
Posts: 9
Joined: Mon Nov 24, 2008 10:24 am
Location: Germany
Contact:

Translation Engine

Post by voiid »

I agree UlRichard. To me it also makes no sense to translate parts of the script itself. Nasty nasty, as C++ programmer I already fight enough with the extreme lack of real coding functionality.

Regards,

voiid
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
tj
Posts: 44
Joined: Tue Nov 04, 2008 9:38 am
Location: Atlanta, GA

Run Program Returns 259

Post by tj »

Did you ever identify why the return value was 256? I'm getting 259 with no localization or translation code. I can verify, as you did with echo, that the console app returns a 15 but I can't get anything other than 259.
voiid
Posts: 9
Joined: Mon Nov 24, 2008 10:24 am
Location: Germany
Contact:

Return Value

Post by voiid »

Hey TJ,

in your case I would check if my command line is correct.
Maye it contains spaces, in that case I would use something like that:
my.exe "$TARGETDIR\\SOMEFOLDER"
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
tj
Posts: 44
Joined: Tue Nov 04, 2008 9:38 am
Location: Atlanta, GA

Use \"Wait For Program To Finish\" Checkbox

Post by tj »

I just determined that 259 is a standard exit code.

Simple solution, for me, was to use "Wait For Program To Finish" checkbox to ensure the program had finished updating the return value.
colnjackman
Posts: 8
Joined: Wed Jan 07, 2009 8:57 pm

Use \"Wait For Program To Finish\" Checkbox

Post by colnjackman »

I am trying to do something like this as well with a batch file and even with the "Wait for program to finish" checkbox is checked it doesn't seem to work.

I have a very simple batch file that just contains.

@echo off
EXIT /B 1

This should return a non-zero value to IA but it seems that using the Run Program doesn't get this value. Now when I run this from command line, I can check %ERRORVALUE% and it is set to 1.

In IA it always returns 0.

Ideas

Thanks
Colin
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Batch files are processed by cmd.exe, they cannot be run natively as they are not executable files.

You can read up about cmd.exe command line parameters to execute batch files.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply