Results 1 to 9 of 9

Thread: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

  1. #1

    Default "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    In my setup, there is an option to install Microsoft SQL with options my app
    needs. It has all the script options to install it unattended with no use
    input. I put all this in a run command, as follows:

    FileName: SETUP.EXE
    Target Folder: %TCS_SQL_SETUPPATH% (this is set earlier with a browse)
    Command Line: [TCS_SQL_OPTIONS_1] [TCS_SQL_OPTIONS_2] [TCS_SQL_OPTIONS_3]
    (these are set in my options.
    Start Parameter: <empty>
    Default Directory: %TCS_SQL_SETUPPATH% (same as Target Folder)
    Wait for Program - Checked
    Use ShellExecuteEx - Checked
    Hide Window - Unchecked
    Open Web Page - Unchecked

    All the other tabs are left default.

    The SQL install is a 2-CD install, and when it comes up with the message
    "Insert disk 2", SB runs past the wait setting %_SB_ERRORCODE%, resulting in
    the rest of my install terminating. The SQL does continue to finish, no
    errors.

    Any ideas?

    Thanks,
    -Glenn.

  2. #2

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    Glenn,

    As I understand it, SETUP.EXE is a multiple-volume setup that installs
    Microsoft SQL. Your main installation executes SETUP.EXE and should wait.
    But it only waits until SETUP.EXE prompts for "Insert Disk 2", right?

    An application has to use the WaitForSingleObject Windows API to "wait" for
    a program. What seems to happen in your case is that the
    WaitForSingleObject API returns if the "Insert Disk 2" message box is
    displayed. Unfortunately, there is nothing we can do if WaitForSingleObject
    returns. I would suggest to test if unchecking "Use ShellExecuteEx" makes a
    difference (but I doubt it).

    --
    Friedrich Linder
    Lindersoft
    www.lindersoft.com
    +1.954.252.3910

    "point. click. ship" - that's SetupBuilder 6.7
    Create Windows Vista ready installations in minutes

    -- Official Comodo Code Signing and SSL Certificate Partner

  3. #3

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    Glenn,

    I have tested this here on our machines (Windows 2000, Windows XP SP2 and
    SP3, Windows XP Media Center, Windows Server 2003, Windows Vista Ultimate
    and Business 32- and 64-bit, Windows Server 2008). Both installations
    created with SetupBuilder 6.7 latest build.

    I have developed a multiple-volume (2 images) test.exe. This test.exe is
    executed from the main.exe installer - the "wait" option is enabled. The
    main.exe launches the test.exe multiple-volume installer. The "Please
    insert disk yadayada" message from the test.exe pops-up. Main.exe is still
    in wait status. The 2nd install image is used, the next "Please insert disk
    yadayada" appears. Main.exe is still in wait status, it returns when the
    test.exe terminates.

    Friedrich

    --
    Friedrich Linder
    Lindersoft
    www.lindersoft.com
    +1.954.252.3910

    "point. click. ship" - that's SetupBuilder 6.7
    Create Windows Vista ready installations in minutes

    -- Official Comodo Code Signing and SSL Certificate Partner

  4. #4

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    To make sure I understand, your test is with unchecking "Use
    ShellExecuteEx", and then everything worked properly?
    That's great news. I will give that a shot as soon as I get back to the
    office tomarrow.

    thanks!

    Glenn Paschal

  5. #5

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    Glenn,

    > To make sure I understand, your test is with unchecking "Use
    > ShellExecuteEx", and then everything worked properly?
    > That's great news. I will give that a shot as soon as I get back to the
    > office tomarrow.

    No, it works with and without the ShellExecuteEx option here. I can send
    you my test scripts if you want.

    Friedrich

  6. #6

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    ok, forgive my confusion... but I'm not sure what you are trying to tell
    me...
    I've got an error in my script somewhere?
    or, I've got something set wrong?
    sorry for being a little on the dense side, been a rough couple of days!

    Thanks,
    -Glenn.

  7. #7

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    Glenn,

    Well, I am trying to tell you that I can't reproduce it here and that the
    Windows WaitForSingleObject API handles the "wait for program". In other
    words, if Windows WaitForSingleObject decides that the "wait if over" then
    there is very little you can do

    HTH,
    Friedrich

    --
    Friedrich Linder
    Lindersoft
    www.lindersoft.com
    +1.954.252.3910

    "point. click. ship" - that's SetupBuilder 6.7
    Create Windows Vista ready installations in minutes

    -- Official Comodo Code Signing and SSL Certificate Partner

  8. #8

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    Ah. Gotcha. Ok, I will try Geoffs solution, see what kind of results I
    have with that. Or may just pop a screen that says "Press OK after the SQL
    installation finishes."

    Thanks,
    -Glenn.

  9. #9

    Default Re: "Run Program" with Wait option fails to wait when "running" a 2 CD install...

    Hi Glenn,

    I have a situation where the script kept running before the executable
    finished so I finished up doing the following:

    Run Program %_SB_INSTALLDIR%\wmpcdcs8.exe /q:a /r:n (Always
    Install) [Wait]
    Set Variable %LOOPID% to "1"
    Loop
    Set Variable %LOOPID% to (Increment Variable by 1)
    Sleep for "3" seconds
    Set Variable %ACTIVE% to ScriptItem->Detect Active
    Application(wmpcdcs8.exe)
    If %ACTIVE% Equals "603" Then
    Break Loop
    End
    If %LOOPID% Equals "4" Then
    Break Loop
    End
    End

    This effectively starts the program, then periodically loops to see if
    the executable is still active. It also includes a fail-safe so that
    it can't go into an eternal loop if something goes wrong. It closes
    either after 12 seconds (4 loops x 3 second sleep) or if the
    executable closes.

    Best Regards,
    Geoff Spillane
    Data Down Under

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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