PDA

View Full Version : Logic Question



NewsArchive
11-27-2009, 08:02 AM
Hi Friedrich (me again!)<g>

Got a MS Update which is returning a SBErrorcode of 259 when its installed
itself.
Now I've modified the script like so
If %_SB_ERRORCODE% Does Not Equal "0" Or %_SB_ERRORCODE% Does Not Equal
"259" Then
Throw message
END
I've also tried
If %_SB_ERRORCODE% Does Not Equal "259" Or %_SB_ERRORCODE% Does Not Equal
"0" Then

But its still showing throwing the error message.

Have I got my logic wrong somewhere or do I need to wrap the numbers with
quotes or apostrophes?<g>

The only other thing I'm wondering is as SB is written in Clarion and when
doing a filter for example testing for a zero you have to do (var*1)=0 so
maybe its this or Clarions loose typing thats at play here?
For an example of the (var*1)=0 problem see the post in C.L.C 20th Nov 09,
3:09am Filter on Browse acting strange by Bob R.

Cheers

Richard

NewsArchive
11-27-2009, 08:02 AM
Richard,

PMFJI... seems if the errorcode is 259, then it's not 0. Therefore,
you'll have your error message thrown any time the errorcode is not 0.

If you're trying to filter out 259, then try
If %_SB_ERRORCODE% Does Not Equal "0" And %_SB_ERRORCODE% Does Not Equal
(Ignore Case) "259" Then

BTW... the help for the Run Program script function mentions that "A return
value of 259 means the application is still running! "

Are you waiting for the update to finish running?

Jane Fleming

NewsArchive
11-27-2009, 08:05 AM
Hi Jane

I've just spotted where I have screwed up! Last week I cut n pasted all the
error messages with a std message box format and also added a call to run
Teamviewer remote access.

Anyway I've over written the

If %_SB_RETURN% Does Not Equal "1" Then
Run Program %_SB_INSTALLDIR%\TeamViewerQS.exe (Always
Install)
Display Message Box "You have experienced an error during
installation ..." -- "Installation Halt"
End


with
If %_SB_ERRORCODE% Greater Than "0" Then
Run Program %_SB_INSTALLDIR%\TeamViewerQS.exe (Always
Install)
Display Message Box "You have experienced an error during
installation ..." -- "Installation Halt"
End

So I'm now correcting the problem. <blush>
Your 259 application is still running was the clue I needed as I had all my
run commands set to wait for the program.

Out of interest where can I find the errorcodes that told you 259 was the
app is still running, as I've been using the ones from here?
http://msdn.microsoft.com/en-us/library/ms681382%28VS.85%29.aspx


Cheers

Richard

and the help files dont have a list of errorcodes.

NewsArchive
11-27-2009, 08:05 AM
Hi Richard,

> Out of interest where can I find the errorcodes that told you 259 was the
> app is still running, as I've been using the ones from here?
> http://msdn.microsoft.com/en-us/library/ms681382%28VS.85%29.aspx

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

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

Friedrich