Reply to Thread

Post a reply to the thread: Not getting Windows error message with SQL Server

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 03-05-2014, 09:31 AM
    linder

    Re: Not getting Windows error message with SQL Server

    You are welcome!

    Friedrich
  • 03-05-2014, 08:59 AM
    notlogan

    Re: Not getting Windows error message with SQL Server

    If %WINVER Equals "$WIN_7$ And %OSSP% Less Than "1" Then
    display message
    Exit Installation
    End
    install SQL Server
  • 03-05-2014, 08:35 AM
    notlogan

    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!
  • 03-05-2014, 08:26 AM
    linder

    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
  • 03-05-2014, 08:20 AM
    notlogan

    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?
  • 03-05-2014, 07:39 AM
    linder

    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
  • 03-05-2014, 07:25 AM
    notlogan

    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?
  • 03-05-2014, 05:22 AM
    linder

    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
  • 03-05-2014, 05:07 AM
    notlogan

    Re: Not getting Windows error message with SQL Server

    I'm using Run Command Line. Will that work the same with the return value?
  • 03-05-2014, 02:51 AM
    linder

    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
This thread has more than 10 replies. Click here to review the whole thread.

Posting Permissions

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