+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Not getting Windows error message with SQL Server

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Not getting Windows error message with SQL Server

    I'm installing SQL Express as part of my project. Normally the installation goes fine. However SQL Express won't install on Win 7 OS that doesn't have SP2 installed.

    When I run my SB 8.1 project the install fails and doesn't flash the error message telling you to install the SP. Is there a way to force this message?

    script:
    %MY_INSTFOLDER%\SQLEXPR_x86_ENU.exe /ACTION=Install /FEATURES=SQL /INSTANCENAME=DataBinder /SQLSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE" /IACCEPTSQLSERVERLICENSETERMS=True /NPENABLED=1 /TCPENABLED=1 /ADDCURRENTUSERASSQLADMIN /QS

    Thanks.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Not getting Windows error message with SQL Server

    Hello,

    You have to check if "SQLEXPR_x86_ENU.exe" returns an error code. For example, if you are using "Run Program..." the %_SB_ERRORCODE% return value can hold the last exit code returned by the executable associated with the work item on its last run (see attached screenshot).

    Hope this helps a bit.

    Friedrich
    Attached Images Attached Images  

  3. #3

    Default Re: Not getting Windows error message with SQL Server

    I'm using Run Command Line. Will that work the same with the return value?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Not getting Windows error message with SQL Server

    Hello,

    No. Only the "Run Program..." script function gives you this extra information (if available).

    The "Run Command Line..." script function is just a simple wrapper around the CreateProcess Windows API.

    Friedrich

  5. #5

    Default Re: Not getting Windows error message with SQL Server

    So there is really no way I can tell the user why their install failed? There is not a way to show windows generated message boxes?

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Not getting Windows error message with SQL Server

    Of course, you can. Just catch the exit code from the executable. In most cases, Microsoft runtimes return an error code -- you can then display this in a message box.

    But that's not your main problem. You should *always* check the system requirements for the specific runtimes (see MSDN) before you launch a runtime. For example, if the runtime requires Windows 7 SP2 then check for SP2 before you launch the redistributable. Display a message that Windows 7 SP2 is required and exit the install. Don't wait for the error

    Friedrich

  7. #7

    Default Re: Not getting Windows error message with SQL Server

    DUH......that's obviously the solution.....

    Is Get System Info then check service pack # the best way to do it?

    I'd have to check if major version number = 6, minor version = 1 and sp>0?

  8. #8
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Not getting Windows error message with SQL Server



    Yes, "Get System Info..." is the way to go. Similar to the attached screenshot... Then, if the OS is Windows 7 and SP is < 1, display a message and terminate the install.

    Friedrich
    Attached Images Attached Images  

  9. #9

    Default Re: Not getting Windows error message with SQL Server

    OK...I was going to do set three variables: Major OS Minor OS and Service Pack. But WINVER would eliminate having to do major and minor.

    Thanks!

  10. #10
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Not getting Windows error message with SQL Server

    You are welcome!

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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