Indigo Rose Software

Professional Software Development Tools

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

    Download from web, installing

    I'm trying to make up a routine that will
    1. Check if sql server installed
    2. If not installed,
    3. download sql express from my web, showing message of what it's doing.
    4. If download successfull, download db showing message of what it's doing.
    5. If successfull install sql express
    6. If successfull install db

    Below is what I have thus far, but if I know how to do the above, I will be able to figure out the rest.

    Thanks, Sheri

    local bdbInstall = false;

    bKeyExists = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft SQL Server\\SQLEXPRESS");

    if bKeyExists == false then

    --download sql express and database from our web
    HTTP.Download("http://www.scheduleez-pro.com/downloads/SQLEXPR32.exe","_TempFolder..", MODE_BINARY, 30, 80, nil, nil, nil);

    -- download db
    HTTP.Download("http://www.scheduleez-pro.com/downloads/EZDB.exe","%TempFolder%", MODE_BINARY, 30, 80, nil, nil, nil);

    -- Install sql express
    bsql = File.Run(_TempFolder.."\\SQLEXPR32.exe", "", "", SW_SHOWNORMAL, true);

    -- install db
    bsql = File.Run(_TempFolder.."\\EZDB.exe", "", "", SW_SHOWNORMAL, true);

    else -- key exists so just download db

    --- downlooad just the db
    HTTP.Download("http://www.scheduleez-pro.com/downloads/EZDB.exe","%TempFolder%", MODE_BINARY, 30, 80, nil, nil, nil);

    --- install db
    bsql = File.Run(_TempFolder.."\\SQLEXPR32.exe", "", "", SW_SHOWNORMAL, true);

    end

  2. #2
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    You are interspersing variables without (I think) understanding what they do

    Code:
    --download sql express and database from our web
    HTTP.Download("http://www.scheduleez-pro.com/downloads/SQLEXPR32.exe","_TempFolder..", MODE_BINARY, 30, 80, nil, nil, nil);
    Note that _TempFolder is already a string variable so if you are going to use it then the command would be

    Code:
    --download sql express and database from our web
    HTTP.Download("http://www.scheduleez-pro.com/downloads/SQLEXPR32.exe",_TempFolder, MODE_BINARY, 30, 80, nil, nil, nil);
    But then you change your method and use a %variable% which has not been expanded. %TempFolder% needs to be expanded so

    Code:
    -- download db
    HTTP.Download("http://www.scheduleez-pro.com/downloads/EZDB.exe","%TempFolder%", MODE_BINARY, 30, 80, nil, nil, nil);
    would become

    Code:
    -- download db
    HTTP.Download("http://www.scheduleez-pro.com/downloads/EZDB.exe",SessionVar.Expand("%TempFolder%"), MODE_BINARY, 30, 80, nil, nil, nil);
    The rest of the code needs changing accordingly but I would stick with either _TempFolder or %TempFolder% but not both as you will become confused.

    John

Similar Threads

  1. Failed to download file from Web (#8, Line 7)
    By moonshow in forum TrueUpdate 1.0
    Replies: 0
    Last Post: 01-27-2006, 02:49 AM
  2. Internet - Download Web File with proxy settings
    By cdemallie in forum AutoPlay Media Studio 4.0
    Replies: 8
    Last Post: 07-16-2003, 10:55 AM
  3. HOW TO: Return a Web Browser Object to the Original URL after a Page Jump
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 02-03-2003, 09:18 AM
  4. Web Download ????
    By fredl in forum AutoPlay Media Studio 4.0
    Replies: 12
    Last Post: 11-05-2002, 10:08 AM
  5. HOWTO: Download and Install Files from the Web
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-23-2002, 01:16 PM

Posting Permissions

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