App-V 5.1 bug or expected behaviour?

Recently I came across a post in TechNet as the scripts added in deploymentconfig.xml file is not getting triggered when using the App-V generated MSI file for publishing in App-V 5.1.


I planned to do a simple test to check this case before giving out confirmation from my end. Below I have compared this scenario between App-V 5.0 SP3 and App-V 5.1 generated MSI's.


App-V 5.0 SP3:

Step 1- Created a virtualized package.
Step 2- Added a script in deploymentconfig.xml file which would do a simple file copy.




Step 3- Ran the App-V 5.0 SP3 generated MSI and found that it is using the deployment config file and triggered the script and copied the file as expected.
Step 4- Reverted the machine to clean state.
Step 5- Edited the deployment config file and removed / in </MachineScripts>



Step 6- Ran the MSI and see the below error.


Step 7- Checked in App-V event log and see the exact reason for failure that tag is not closed properly.


This proves that App-V 5.0 packages use deployment config file.

App-V 5.1:

Step 1- Created a sample virtualized package using App-V 5.1.
Step 2- Performed the same steps like above. Added a script in deploymentconfig.xml file which would do a simple file copy.




Step 3- Ran the MSI and found that it is not using the deployment config file and did not trigger the script. The file wasn't copied like expected.
Step 4- Reverted the machine to clean state.
Step 5- Edited the deployment config file and removed / in </MachineScripts>



Step 6- Ran the MSI and see that it is getting installed successfully. This shouldn't be the case.

This proves that App-V 5.1 has some sort of bug when installed through its generated MSI that it is not using the deploymentconfig.xml like previous App-V 5.0 version or is this the expected one that App-V 5.1 generated MSI will no longer use the deploymentconfig.xml file? Expecting Microsoft App-V Team to give their answer.

UPDATE:


Editing the App-V 5.0 SP3 PackageMsiTemplate.msi in c:\Program Files\Microsoft Application Virtualization\Sequencer\en-us shows that SetPublishPackage32 Customaction has condition set to below.

APPV_OR_MSI_FILE=[APPV_OR_MSI_FILE];APPV_DEPLOYMENTCONFIG=[APPV_DEPLOYMENTCONFIG];APPV_LOCAL=[APPV_LOCAL];MSI_TEMPLATE_REGKEY=Software\Microsoft\AppV\MsiTemplate\[ProductCode]

                  

Editing the App-V 5.0 SP3 sequencer generated MSI with ORCA shows that SetPublishPackage32 Customaction reflects the same as in PackageMsiTemplate.msi


APPV_OR_MSI_FILE=[APPV_OR_MSI_FILE];APPV_DEPLOYMENTCONFIG=[APPV_DEPLOYMENTCONFIG];APPV_LOCAL=[APPV_LOCAL];MSI_TEMPLATE_REGKEY=Software\Microsoft\AppV\MsiTemplate\[ProductCode]

                  

In App-V 5.1:


Editing the App-V 5.1 PackageMsiTemplate.msi in c:\Program Files\Microsoft Application Virtualization\Sequencer\en-us shows that SetPublishPackage32 Customaction has condition set to below.

APPV_OR_MSI_FILE=[APPV_OR_MSI_FILE];MSI_TEMPLATE_REGKEY=Software\Microsoft\AppV\MsiTemplate\[ProductCode]




It is missing APPV_DEPLOYMENTCONFIG=[APPV_DEPLOYMENTCONFIG] property and so App-V 5.1 generated MSI doesn't use the deployment config file while installing in standalone mode.


Many a thanks to App-V Techie Roy Essers for confirming this point.

Comments

Popular posts from this blog

MSIX - The future universal format

Exploring Advanced Installer Express free edition to convert legacy apps to UWP

Right Click and Publish App-V Package along with Dynamic Configuration File - Context Menu Shortcut