none
AppV-5 more than one deployment scripts in <MachineScripts> XML section

    Question

  • Hi, it seems that we can't put more the one script in the App_DeploymentConfig.xml under the same node (AddPackage, RemovePackage, PublishPackage, UnpublishPackage). Can someone can confirm this? I can find in the documentation if there is a limitation there or I make a mistake in the XML file.

    Here an example. The code below failed:
        <MachineScripts>
        <AddPackage>
            <Path>msiexec.exe</Path>
            <Arguments>/i [{AppVPackageRoot}]\path_to_drivers\\install_driver_1.msi /qn</Arguments>
            <Wait RollbackOnError="false" Timeout="60"/>
          </AddPackage>
       <AddPackage>      
          <Path>msiexec.exe</Path>
            <Arguments>/i [{AppVPackageRoot}]\path_to_drivers\install_driver_2.msi /qn</Arguments>
            <Wait RollbackOnError="false" Timeout="60"/>
          </AddPackage>
        </MachineScripts>

    The solution is to create a new script that calls the two msiexec installation like below. But just to be sure, is there a limitation?

        <MachineScripts>
        <AddPackage>
            <Path>wscript</Path>
            <Arguments>\\unc_path_to_vbs\install_2_drivers.vbs</Arguments>
            <Wait RollbackOnError="false" Timeout="60"/>
          </AddPackage>
        </MachineScripts>


    • Edited by SimBco Friday, December 07, 2012 7:09 PM
    Friday, December 07, 2012 6:55 PM

Answers

All replies

  • What error did you receive?

    Is this possibly because one is overlapping the other? Did you try the same above and user verbose lagging. Was there an App-V error?


    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog: rorymon.com Twitter: @Rorymon

    Friday, December 07, 2012 8:35 PM
  • When the package is added with Powershell, the error is related to the XML and it failed to add the package. It's not a problem with the scripts itself. Below the error log in the event viewer and in the Powershell console. As you say, it seems that we can't overlapp two scripts in the same node in the XML MachineScripts section. For this example, it's in the node "AddPackage".


    Failed to validate provided xml.
    DOM Error: Unknown HResult Error code: 0xc00ce014
    Reason: Élément « {http://schemas.microsoft.com/appv/2010/deploymentconfiguration}AddPackage » inattendu selon le modèle de contenu de l'élément parent « {http://schemas.microsoft.com/appv/2010/deploymentconfiguration}MachineScripts ».

    Add-AppvClientPackage : XML document could not be loaded because it is
    invalid. Please supply a valid XML document. Please consult AppV Client Event
    Log for more details.
    Operation attempted: Configure AppV Package.
    AppV Error Code: 050009000A.
    Please consult AppV Client Event Log for more details.
    Au caractère Ligne:1 : 1
    + Add-AppvClientPackage
    '\\srv\test.appv' ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidResult : (:) [Add-AppvClientPackage], ClientException
        + FullyQualifiedErrorId : ConfigurePackageError,Microsoft.AppV.AppvClientPowerShell.AddAppvPackage

    Friday, December 07, 2012 9:12 PM
  • Hello,

    It seems that you can only leverage one script at the time.


    Nicke Källén | The Knack| Twitter: @Znackattack

    • Marked as answer by SimBco Saturday, December 08, 2012 8:42 PM
    Saturday, December 08, 2012 6:32 PM