none
Conditional Install of dependencies RRS feed

  • Question

  • Hi,

    I have a windows desktop app(C#) that I have always packaged with the VS.Net MSI project (Vs.Net 2008). I've always added the .Net framework and MS SQL 2005 Express as a dependency.

    Going forward we'd like to ship with our application SQL Express 2008. But we dont have any SQL 2008 specific usage in our code. Its just that we want to bundle 2008.

    So for folks who upgrade to our latest version of the application, we dont want to automate an upgrade to 2008 express. All we want to do is upgrade our own app (purely private assemblies) and move on.

    So, we want to be able to perform a test for the SQL Express family of products (SQLEXpress 2005/SP1/SP2/SP3 or SQLExpress 2008) and if any of this exists, skip installing SQL Express 2008.

    Additionally, if we can bring up an info message that says, you are running on an older version of sql express. consider upgrading to the latest that would be great. But not essential.

    Is such a conditional install of prerequisites possible with VS.Net MSI installer project ? Any ideas/pointers will help.

    Regards,
    Avinash


    PS: on second thoughts, this appears more to do with the boot strapper and less to do with the MSI itself. Maybe, Its easier to substitute the bootstrapper produced by the setup project or even disable it completely and build a custom bootstrapper. Just a thought. Will appreciate comments.
    • Edited by avinashraj Thursday, July 9, 2009 5:57 PM second thoughts
    Thursday, July 9, 2009 8:34 AM

Answers

  • Hello Avinash,

    The Setup Project in Visual Studio only supports searching target machine for Windows Installer Components, Files and Registry Entries; that happens when the MSI is being processed. I think it is too late at that stage to do anything about SQL Server Express installation.

    The Launch Conditions are the Setup.exe bootstrapper's job, as you already know. But the default bootstrapper doesn't have the ability to do what you want (to combine more than one condition results and make corresponding action).

    So I think you're right, without switching to 3rd party Windows Installer tools, building your own custom bootstrapper would be the right way to go.

    To get started, you may want to read this:
    Setup.exe Bootstrapper Sample Operations

    And download this:
    Microsoft .NET Framework Setup.exe Bootstrapper Sample

    Or consider this project on CodePlex:
    dotNetInstaller: setup bootstrapper for Windows

    Hope this helps.

    Regards,

    Jie
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    • Marked as answer by avinashraj Tuesday, July 14, 2009 3:45 AM
    Monday, July 13, 2009 9:40 AM
    Moderator

All replies

  • Hello Avinash,

    The Setup Project in Visual Studio only supports searching target machine for Windows Installer Components, Files and Registry Entries; that happens when the MSI is being processed. I think it is too late at that stage to do anything about SQL Server Express installation.

    The Launch Conditions are the Setup.exe bootstrapper's job, as you already know. But the default bootstrapper doesn't have the ability to do what you want (to combine more than one condition results and make corresponding action).

    So I think you're right, without switching to 3rd party Windows Installer tools, building your own custom bootstrapper would be the right way to go.

    To get started, you may want to read this:
    Setup.exe Bootstrapper Sample Operations

    And download this:
    Microsoft .NET Framework Setup.exe Bootstrapper Sample

    Or consider this project on CodePlex:
    dotNetInstaller: setup bootstrapper for Windows

    Hope this helps.

    Regards,

    Jie
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    • Marked as answer by avinashraj Tuesday, July 14, 2009 3:45 AM
    Monday, July 13, 2009 9:40 AM
    Moderator
  • Many Thanks Wang, for taking the time to respond to my question. I managed to figure out how to set up packages that the boot strapper may be generated out of and how to roll out conditional installs.

    Thanks and Regards,
    Avinash

    Tuesday, July 14, 2009 3:44 AM
  • Hi Avinash,

    I see that you said you found a solution.  Since this is exactly the issue I am facing, that I wish to install Sql Server Express conditionally, I was hoping that you could share your solution to this problem.

    Thank you!

    Peg

     

    Friday, November 19, 2010 10:10 PM
  • Hello Peg,

    I cant seem to remember the exact specifics as I dont work on that project anymore. I'll try to provide as much context as possible -

    I used the bootstrap manifest generator (I remember it being a click once install from code plex or MS) to customize the bootstrapper. I'm not certain what kind of customization you are looking for, But in my case it turned out that the test that MS performs to check if sql express needs to be installed at all checks for the availability (from what I can remember) the default  named instance of sql.

    Consequently, I only had to package 2008 instead of 2005. And yes that needed me to add packages and add the right product keys in. But the meat of the earlier logic/markup from sql 2005 express remained intact.

    I hope this helps.

    Regards

    Avinash

     

     

    Monday, November 22, 2010 2:53 AM