PDA

View Full Version : AGAIN unhelpful errorcode!!



NewsArchive
02-23-2009, 01:14 AM
Friedrich,

I am now encountering a different error code returned on Run... but - since
SB help tells me NOTHING about it what it means, I have no clue why!

Again, I ask: please provide either
a) text-readable info on error, or
b) at the very least(!) a decoded list of what error codes mean in the
SB help, or
c) information as to where a suitable information list may be looked up
for reference.

What am I supposed to make of the attached? (if it is from a standard
windows list, please tell us which one to inspect)

Or, to put it another way, how is this error code supposed to help me find
"my" script or program error?

Steve

NewsArchive
02-23-2009, 01:16 AM
The SB help says"If the function fails, the return value is a system error
code. A return value of 259 means the application is still running!"


Is this the (part-) list of system error codes to which you refer?

1 Incorrect function.
2 The system cannot find the file specified.
3 The system cannot find the path specified.
4 The system cannot open the file.
5 Access is denied.
[etc]

But this lists 259 as "No more data is available".... Is this the same
thing? Are we talking about the same list?

(Which would then make "Access is denied" the relevant warning for me to
follow up)

I hope you see my point!
Can we make this simpler., with a bit more info please?

Steve

NewsArchive
02-23-2009, 01:17 AM
%_SB_RETURNEX% gives you all you need now.

Hope this helps.

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:17 AM
And I am not sure if you are talking about CreateProcess() or
ShellExecuteEx().

In the latest internal source codes, we have enhanced the ShellExecuteEx
again. %_SB_RETURNEX% also returns the return value provided by sei.hInstApp
now. So we can retrieve all possible error codes for CreateProcess and
ShellExecuteEx (and the SE_ERR_XXX error value provided by ShellExecute).

If you check MSDN for CreareProcess() and ShellExecuteEx() you'll see that
there are different possible error code "lists" for different types of
failures! So it is absolutely IMPOSSIBLE to provide a text-readable info on
error!!!

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:18 AM
> In the latest internal source codes, we have enhanced the ShellExecuteEx
> again. %_SB_RETURNEX% also returns the return value provided by
> sei.hInstApp

If you look at the picture I supplied - you will notice that ReturnEx is
ZERO here.. so out of the picture as far as diagnostics are concerned.



> If you check MSDN for CreareProcess() and ShellExecuteEx() you'll see that
> there are different possible error code "lists" for different types of
> failures! So it is absolutely IMPOSSIBLE to provide a text-readable info
> on error!!!

And you'll notice that the SB Help does *NOT* say this!
So how are we to know?



> If you check MSDN for CreareProcess() and ShellExecuteEx() you'll see that
> there are different possible error code "lists" for different types of
> failures! So it is absolutely IMPOSSIBLE to provide a text-readable info
> on error!!!

Not at all! Either:
1. Make it clear in the help that this is the case AND provide 2 x URLs to
the lists in question, or
2. Do as we do in Clarion when working between 'normal' file handling errors
(ie where error code <> 0 but <> 90) and 'system' file errors, where if the
first return text from ERROR, if the second return text from FILEERROR!

Not hard at all <G>

Hope this is clear.
Steve

NewsArchive
02-23-2009, 01:19 AM
>> In the latest internal source codes, we have enhanced the ShellExecuteEx
>> again. %_SB_RETURNEX% also returns the return value provided by
>> sei.hInstApp
>
> If you look at the picture I supplied - you will notice that ReturnEx is
> ZERO here.. so out of the picture as far as diagnostics are concerned.

It's possible that %_SB_RETURNEX% has an incorrect value ("0") because
sei.hInstApp is not handled in the current runtime when using
ShellExecuteEx.

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:19 AM
Hi Friedrich,

> %_SB_RETURNEX% gives you all you need now.

Would it be possible to have something like %_SB_ERROR_TEXT% that returned
the value of FormatMessage() for the %_SB_RETURNEX% ?

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
02-23-2009, 01:21 AM
Hi Arnór,

> Would it be possible to have something like %_SB_ERROR_TEXT% that returned
> the value of FormatMessage() for the %_SB_RETURNEX% ?

The major problem here is that the FormatMessage() function can only be used
to obtain error message strings for the system error codes returned by
GetLastError. So if the error code is not returned from GetLastError, the
call to FormatMessage would also not help.

In the screenshot Steve posted, ReturnEx is 0. So FormatMessage would not
help at all.

But hey, no problem -- this is SetupBuilder ;-) See attached demo script
and screenshot. The project can "translate" any GetLastError code for you.

I assume Steve is using ShellExecuteEx (but I am not sure). I have enhanced
error handling again and tomorrow, %_SB_RETURNEX% will also returns the
return value provided by sei.hInstApp.

Friedrich

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:22 AM
Hi Friedrich,

> The major problem here is that the FormatMessage() function can only be used
> to obtain error message strings for the system error codes returned by
> GetLastError. So if the error code is not returned from GetLastError, the
> call to FormatMessage would also not help.

I know. And then you have the never ending question WHICH API call is the
important one and you should grab the error from. Like in case of
shellexecute or create process - if the program is waiting there might be no
error in those api, but one in WaitForSingleObject or whatever else might be
going on in that particular action - so which one is the important error;)

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
02-23-2009, 01:23 AM
Hi Arnór,

> I know. And then you have the never ending question WHICH API call is the
> important one and you should grab the error from. Like in case of
> shellexecute or create process - if the program is waiting there might be
> no error in those api, but one in WaitForSingleObject or whatever else
> might be going on in that particular action - so which one is the
> important
> error;)

Yes, absolutely :)

And to make it even more complicated, you also have to find a way to handle
return codes passed from the executed application back to the installer.
Running an application and handling the "return values" is a very complex
task.

For example, the following from a standard Microsoft .NET 3.0 Framework
redistributable:

0 = The action completed successfully.
1602 = The user canceled installation.
1603 = A fatal error occurred during installation.
1605 = This action is valid only for products that are currently installed.
1636 = The patch package could not be opened or the patch was not applicable
to the .NET Framework 3.0.
1639 = Invalid command line argument.
1641 = The installer has initiated a restart. This indicates success, and
setup will continue after restart. (The reboot is not performed if
he /norestart option was specified.)
1643 = The patch package is not permitted by system policy.
3010 = A restart is required to complete the installation. This message
indicates success.

Let us assume, the .NET installation needs a restart and returns 3010.

%_SB_ERRORCODE% is 3010
%_SB_RETURNEX% is 0

So in this case, even a return value of 3010 means "success".

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:24 AM
EXACTLY Arnor... like when we are doing file functions.. we probably:

1. check errorCODE for non-zero
2. if non-zero, check if it is 90
3. if it IS, then return FILERROR with appropriate PK info
4. if NOT, then return ERROR with appro. PK info

We do it for file.. let it be done for APIs that return standard errors - as
it is claimed that Run does

Just stirring the pot...<g>

Steve

NewsArchive
02-23-2009, 01:25 AM
No, no!
Look at the pic,

Return Ex is 0, and is thus 'out of the picture' this time.

My point is - where are the decodes for these error codes?
At the very least please supply links to list in the Help (cf. Clarion
errors/errorcodes).

Steve

NewsArchive
02-23-2009, 01:26 AM
> Is this the (part-) list of system error codes to which you refer?
>
> 1 Incorrect function.
> 2 The system cannot find the file specified.
> 3 The system cannot find the path specified.
> 4 The system cannot open the file.
> 5 Access is denied.
> [etc]
>
> But this lists 259 as "No more data is available".... Is this the same
> thing? Are we talking about the same list?

GetLastError codes:

http://msdn.microsoft.com/en-us/library/ms681381(VS.85).aspx

Yes, SetupBuilder documentation says:

"If the function fails, the return value is a system error code. A return
value of 259 means the application is still running!"

259 has nothing to do with "No more data available".

STILL_ACTIVE (0x0103) = 259 (returned by the GetExitCodeProcess API)

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:26 AM
Great!

Now please add that URL to the help as a link!
(problem ameliorated).

However..... even that list whose url you supply contains the following for
259:
ERROR_NO_MORE_ITEMS
259
0x103
No more data is available.



Which begs the question: at which point do you *stop* using error codes
provided by the system error codes list?
(after 255??? Please list that info, so no false lookups occur)


But the main point - please just add that link to the help!
Steve

NewsArchive
02-23-2009, 01:27 AM
> However..... even that list whose url you supply contains the following
> for 259:
> ERROR_NO_MORE_ITEMS
> 259
> 0x103
> No more data is available.

If you read my previous messages (or what Arnór posted) you will notice that
there is more than one source for possible error or return codes.

Documentation clearly states that "...A return value of 259 means the
application is still running!..."

259 (STILL_ACTIVE) should not be interpreted as an error code!

Regards,

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-23-2009, 01:28 AM
Then publish a list of URLs in the help, with an indication where to look
depending upon how one has the SB set up.

I have no idea why you're resisting this - providing informative help (as
opposed to a code which means RTFM) is just good practice!

Lack of depth in *some* of the help is one of the very few complaints I have
with SB - why should someone be an expert in APIs to create an installer?
This is something a 'junior' could normally do.....

Anyway, you will or you won't... complaint (aka 'helpful suggestion')
over...

Steve

NewsArchive
02-23-2009, 01:29 AM
Steve,

Did you read the post Friedrich sent you on the 06/02/2009 answering the same question ?

quote
We have modified the SetupBuilder runtime now. When calling "Run Program",
the %_SB_RETURNEX% value always holds the GetLastError() error code if
CreateProcess failed or the error code provided by a failed ShellExecuteEx
API call.
end quote

I may not have anything to understand in all this but what I do understand is the "form" in which you seem to have all your recent posts in the NG - and I must say I find
them way too "much" in their wording

Respect is something we all deserve and if there is ONE person in all our community who does it is Friedrich and setup Builder

Life thought me since long that the manner one asks things does have an influence on the result : when Friedrich starts answering with a one line post = it starts
"smelling" his very politely expressed irritation .....

I am sure if you tried differently things would be different for you also ;)

"AGAIN unrespectful post from Steve Bywaters" ..... how would you appreciate such a sentence ?



Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center
A tool to let you Migrate Import Export Transfer your Data
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" &
"Works with Windows Server 2008"

NewsArchive
02-23-2009, 01:30 AM
'with respect';.. you 've completely missed the point of the post..

Unfortunately you didn't read my posts carefully enough to realise that the
cause of the problem is *different*... but the (non-helpful errocode) is the
same *problem*

Your quoted passage is not relevant - return ex isnot involved.

I suggest you let Friedrich put his own case - he's more than capable!

Steve

NewsArchive
02-23-2009, 01:31 AM
capable he is
capable of posting "nicely" are you ?

I am sure you are ;)

the right words are always the good choice.

.....

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center
A tool to let you Migrate Import Export Transfer your Data
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" &
"Works with Windows Server 2008"

NewsArchive
02-24-2009, 01:42 AM
Hi Arnór,

>> %_SB_RETURNEX% gives you all you need now.
>
> Would it be possible to have something like %_SB_ERROR_TEXT% that returned
> the value of FormatMessage() for the %_SB_RETURNEX% ?

I have added a new "Get System Error Text..." function to SetupBuilder 7 to
get the text description of a Windows error number.

Friedrich

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-24-2009, 01:43 AM
Merci Friedrich :)


Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center
A tool to let you Migrate Import Export Transfer your Data
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" &
"Works with Windows Server 2008"

NewsArchive
02-24-2009, 01:43 AM
>
> Merci Friedrich :)
>

;-)

Unfortunately, the new SB6 #2516 maintenance build was already code
complete, so I'll port that function back from SB7 to SB6 in the next build.

Thanks,
Friedrich

NewsArchive
02-24-2009, 01:44 AM
we are told the crisis _will_ end one day - if that is enough to make us happy _today_ then knowing in next release your update _will_ be there makes us secure :)

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center
A tool to let you Migrate Import Export Transfer your Data
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" &
"Works with Windows Server 2008"

NewsArchive
02-24-2009, 01:45 AM
> Anyway, you will or you won't... complaint (aka 'helpful suggestion')
> over...

We have enhanced the "Return Values" and "Remarks" section for "Run
Program...".

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner