Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2004
    Posts
    25

    Can I please at least get an answer on this?

    Why do I get an error from the bolded and red line? It says Line 20 (bolded and red line): `=' expected near `bresult'

    local bresult = false;
    local bsql = false;
    bresult = File.DoesExist("%TempFolder%\\SQLEXPR32.exe");
    SessionVar.Expand(bresult);
    If bresult then
    bsql = File.Run(_TempFolder.."\\SQLEXPR32.exe", "", "", SW_SHOWNORMAL, true);
    end

    I have tried multiple combinations excluding and including expand etc.
    I have to have this done by tomorrow.

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    I guess the error actually comes from the above line -
    SessionVar.Expand(bresult);
    bresult holds true or false so there is nothing to expand, and it's a local and not a session variable.
    Remove this line as it does not seem to do anything.

    Also you may need to expand %TempFolder% in the line
    bresult = File.DoesExist("%TempFolder%\\SQLEXPR32.exe");

    Another thing is that File.Run returns a number (the process exit code - 0 if all OK, otherwise an error number, but only if WaitForReturn is set to true - otherwise it always returns 0 as there is no way to get the exit code), not a boolean true/false value. So I would remove local bsql = false;
    Last edited by pww; 03-18-2007 at 03:08 AM.

  3. #3
    Join Date
    Sep 2004
    Posts
    25

    Not the reason for error

    I had just put in the sessionvar.expand to see if I was getting the error because on needed to expand the variable. I use the latest version of sf 7

    This is in the Pre-Load function of Select Install Folder
    -- Create a local variable and assign a boolean value to it

    local bresult = false;
    local bsql = false;
    bresult = File.DoesExist(_TempFolder"\\SQLEXPR32.exe");
    --If bresult == false then
    -- bsql = File.Run(_TempFolder.."\\SQLEXPR32.exe", "", "", SW_SHOWNORMAL, true);
    --end

  4. #4
    Join Date
    Jun 2005
    Posts
    470
    maybe just a typo, but in the third line you missed the ".." for string concatenation. It should be
    bresult = File.DoesExist(_TempFolder .. "\\SQLEXPR32.exe");

    Next, the IF condition actually says 'run the file if it does not exist' . I guess you should change it to
    If bresult == true then

  5. #5
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    Code:
    If bresult then
    should be

    Code:
    if bresult then
    Our scripting is case sensitive so that could be why it is not making it through the compiler.

    Adam Kapilik

  6. #6
    Join Date
    Sep 2004
    Posts
    25

    Thank you

    Adam, thank you, that was it.

  7. #7
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    No problem. All reserved words in our language are case sensitive and always lower case:

    if
    for
    then
    do
    while
    end
    else
    elseif

    Basically any that turns blue in the script editor.

    Adam Kapilik

Similar Threads

  1. Can it be that no one here knows this answer?
    By liberty1947 in forum Setup Factory 7.0
    Replies: 7
    Last Post: 12-13-2006, 08:26 AM
  2. answer me .... dear
    By elsayed24 in forum Setup Factory 7.0
    Replies: 0
    Last Post: 09-09-2006, 05:39 AM
  3. I Thought I Knew The Answer To This, But I Don't
    By JerryQuinn in forum AutoPlay Media Studio 6.0
    Replies: 9
    Last Post: 02-22-2006, 02:14 PM
  4. possible to use 'answer file"?
    By cduke in forum Setup Factory 6.0
    Replies: 4
    Last Post: 10-12-2003, 01:56 AM
  5. Question please answer me
    By asfour4all in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 06-10-2003, 01:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts