none
MSI execution throgh command line

    Question

  •  

    Hello,
     
        I have developed MSI using setup and delpoyment project in visual studio 2008.
    MSI contains custom action. In custom action editor it calls custom action on INSTALL event.
    I have passed data to custom action by using CustomActionData property as follow :

    /targetsqlserver="[SQLSERVERNAME]" /targetreportserver="[REPORTURL]" /targetdbname="[DBNAME]" /targetwebsitename="[WEBSITENAME]"

    Everything works fine when I install MSI using UI.
    But now I want to execute MSI in silent mode thorugh command line as follow


    C:\>Setup.msi /qb /l* out.txt  targetsqlserver="test1" targetreportserver="http://localhost/Reportserver" targetdbname="db123" targetwebsitename="web123"

    When I execute above command, it passes default values of following properties to custom action
    "[SQLSERVERNAME]", "[REPORTURL]", "[DBNAME]", "[WEBSITENAME]" 
    (Values of all these properties populated from text box inputs and every property has assigned some default value while installing thorugh UI)

    So I re-executed above command as follow :

    C:\>Setup.msi /qb /l* out.txt  targetsqlserver="test1" targetreportserver="http://localhost/Reportserver" targetdbname="db123" targetwebsitename="web123"
     WEBSITENAME="web123" DBNAME="db123" REPORTURL="http://localhost/Reportserver" SQLSERVERNAME="test1"


    But result was same. Data passed to the custom action was default one.
    Data passed to the custom action is not the one specified in command line argument.


    Anyone has idea How to execute MSI through command line arguments by specifying property values for custom action?

    Here is short article on MSI and commanline exceution
    http://www.codeproject.com/KB/install/command_lines_setups.aspx


    Thanks,
    Nitin

    Tuesday, July 22, 2008 5:35 PM

All replies