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?
Run Program returns -11 or 256 as Return Result in Variable
Run Program returns -11 or 256 as Return Result in Variable
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
Reason found!
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.
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
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
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
http://www.paraeasy.ch
http://ulrichard.ch
Translation Engine
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
Regards,
voiid
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
Run Program Returns 259
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.
Return Value
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"
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
---------------------------------------------------
ArCon Kitchen Planning and Interior Design
www.planTEK.de - www.ArConKitchen.com
---------------------------------------------------
Use \"Wait For Program To Finish\" Checkbox
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.
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
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
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:
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.
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/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/

