iritating script error

Got a problem you cannot solve? Try here.
Post Reply
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

iritating script error

Post by Bar_BQ »

Hi,

Making debug of my installer script, I found a strange behaviour that I can't fix. Take a look on script below:

[compiler if Variable BUILDMODE not Equals PATCH]
Get Component $MS_SQLSVR_2008R2_X86$ Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
Display Dialog: progressprereq, use as progress dialog (non-modal)
Include Script: checksql2008r2_x86
if Variable SQL2008R2_X86 Equals TRUE
MessageBox: SQL Server, SQL Server instance $SQLINSTANCE_NAME$ already exists in your system.$NEWLINE$$NEWLINE$Please type different instance name or you can choose other installation type to not install SQL Server.
GoTo Label: sql_serversetup
else
Include Script: setupsql2008r2_x86
end
Hide Dialog
end
[compiler end]

If SELECTED=FALSE then script jumps to wrong end (blue instead to red one) clause. I know sometimes something wrong happens behind script engine and usually simple operations copy->cut->paste of the same code help to fix the problem. But not this time. I even tried to rewrite that code and the effect is the same.

Anybody had already such a problem?
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: iritating script error

Post by Bar_BQ »

Guys, now I got more of these. Script has become useless because "if" checks make an uncontrolled jumps to absolutely unrelated "end".
Help!!!
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Re: iritating script error

Post by CFConner »

I *think* I see the problem - you have the statement "Include Script: checksql2008r2_x86" which perhaps the system has an issue with. Have you tried just taking the entire code block of script checksql2008r2_x86 and putting it into this MIA file to see if it works (without doing an include) to see if it works? It appears that when you do the:

IF

include script block

the "end" ends up inside the scriptblock that falls out instead. I know I may not be making sense - but can you try what I just said above?

=-Chris
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: iritating script error

Post by Bar_BQ »

Thank you for reply CFConner!

This might be a reson for that, but I had tried it before I posted the issue. I copied that piece of code into a new project, commented include function and on compile time I got a message that list is out of bound. It doesn't look good... :(
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: iritating script error

Post by mills »

Bar_BQ, can you post that sample project you created?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: iritating script error

Post by Bar_BQ »

Of course, but, sadly, just on Tuesday due I'm not in the office...
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: iritating script error

Post by Bar_BQ »

Hi guys,


Indeed, CFConner were right, I had an incomplete IF clause in two scripts - in first one I had one more "end" and in a second I had one less "end".
Don't know why I hadn't found it earlier... Anyway, thanks a lot!


BarBQ
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: iritating script error

Post by mills »

Alright! CFConner gets a gold star!
gold_star.jpg
gold_star.jpg (22.36 KiB) Viewed 9345 times
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Bar_BQ
Posts: 99
Joined: Fri Aug 22, 2008 5:45 am

Re: iritating script error

Post by Bar_BQ »

Definitely! :)
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Re: iritating script error

Post by CFConner »

Aw shucks! :)

Moving on - no accident here folks. :)

=-Chris
Post Reply