Indigo Rose Software

Professional Software Development Tools

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

    Command Line Args

    I have created a setup that downloads, unpacks and installs sql server express from the command line in Setup Factory. That works great.
    My problem is after I install sql server I need to run a custom console program using command lines and this does not work. The dos screen pops up but it doesn't do anything except close (it's suppose to create a user, database etc.).

    I tried running the program through Windows command line and it works.
    The code I use is below. I also tried running another console program from the File.run in sf7 and have the same problem.

    result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS script:".._TempFolder.."\\create_user.sql", "", SW_SHOWNORMAL, true);
    --create db

    result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS uid:ezuser pwd@ssw0rd db:ScheduleEz script:".._TempFolder.."\\create_db.sql", "", SW_SHOWNORMAL, true);
    --import data

    result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS uid:ezuser pwd@ssw0rd db:ScheduleEz script:".._TempFolder.."\\new_data.sql", "", SW_SHOWNORMAL, true);

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    If the cmd window quickly disappears there is likely an error in the command (like \ instead of \\, missing quotes etc.), but you can't see the err message because it closes very fast.
    Create your command as a string and then display it in a message box. When the message box pops, open a cmd window and retype the text from the message box there, then press Enter. This way the cmd window will not auto close and you can see if an error is displayed.
    Another way is to save the command string as a .bat file, open a cmd window and run it.

  3. #3
    Join Date
    Sep 2004
    Posts
    25

    Command Line

    I tried using the \\ in the following (.\\EZEXPRESS) server:.\EZEXPRESS but that didn't work. Has anyone else had problems running a console app.

    The following is what I use to install sql express from command and it works great.

    ReturnCode = File.Run(_TempFolder.."\\SQLEXPR32", "SQLEXPR /X:".._TempFolder, "", SW_HIDE, true);

    result = File.Run(_TempFolder.."\\setup.exe", "start /wait setup.exe /qb /settings".._TempFolder.."\\SQLXNew.ini", "", SW_SHOWNORMAL, true);


    The only thing different is really the type of exe it is running.

  4. #4
    Join Date
    Sep 2004
    Posts
    25

    My Mistake

    The problem was my fault; I had two copies of my script.exe and was using the older one. It works fine.

    I must say, I have been using your products for years and your company still gives the best support.

    Thanks,

    Sheri

Similar Threads

  1. Command Line Args
    By markstaylor in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 09-12-2005, 02:52 PM
  2. Example - Viewing Command-line args.
    By Intrigued in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 02-04-2005, 03:22 PM
  3. Start install with command line args
    By HayoOellrich in forum Setup Factory 6.0
    Replies: 4
    Last Post: 10-29-2003, 07:23 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