The dynamic configuration files for App-V 5.0 provide a powerful mechanism to modify the settings associated with an App-V package when it’s deployed at client’s end or launched by a user.
In Appv 5.0 versions, we can pass the scripts into the virtual package through selecting script events using ACE tool. Here, we can pass user_scripts to <AppName>_Userconfig.XML and machine scripts can be added under <AppName>_DeploymentConfig.XML file.
The Latest version of ACE tool Version 1.3 now allows App-V engineers to modify these files quickly and easily and cut out those pesky syntax errors with simple GUI interface. Therefore, the latest ACE tool has various features like:
- Add/Edit User and Machine configuration scripts;
- View, Add, Edit and Delete the shortcuts defined within the App-V package;
- Define an executable whose child processes will be terminated when the application .EXE process is terminated (TerminateChildProcesses);
- Preview the generated XML before saving the file.
In order to execute any machine level or user level scripts through ACE tool we have to follow various script events and the context (System or User) under which they can run.
How to make changes to AppV XML file:-
We have to select script events to enable the scripts which we have added in scripts tab under “package files” while sequencing. How to do this:
After launching ACE shortcut, go to File > select Open > browse for the App-V XML file, i.e. a UserConfig.xml or DeploymentConfig.xml file. Here, we can Mark the script events either in userconfig.xml or deploymentcofig.xml for executing our script to any .XML file as per your requirement. Give it a new name and Save As a different file else we can Save with our original file name itself.
Script events under Deployment dynamic configuration:-
We can enable the script events under Scripts (systemContext) tab in machine configuration.
1) AddPackage(runonce) 3) RemovePackage(runonce)
2) PublishPackage 4) UnPublishPackage
Script events under User configuration:-
We can enable the script events under Scripts (UserContext) tab in user configuration.
1) publishPackage 4) TerminalVirtualEnvironment
2) UnpublishPackage 5) StartProcess
3) StartVirtualEnvironment 6) ExitProcess
Comparing the deployment dynamic configuration and user configuration script events:
PublishPackage and UnpublishPackage are the two script events which were executing in both system context and user context.
AddPackage and RemovePackage are the script events executing only in SystemContext but not in UserContext.
After making changes to the Deploymentconfig.xml or UserConfiguration.xml we have to pass those modified .xml files through PowerShell with admin privileges.
The Deploymentconfig.xml file configures the default settings for package for all users on the computer running the App-V 5.0 client.
Add-AppVClientPackage –Path c:\Packages\Contoso\MyApp.appv -DynamicDeploymentConfiguration c:\Packages\Contoso\DynamicConfigurations\deploymentconfig.xml
The dynamic user configuration file is applied when a package is published to a specific user and determines how the package will run.
Publish-AppVClientPackage $pkg –DynamicUserConfigurationPath c:\Packages\Contoso\config.xml
If we want to apply the DeploymentDynamicConfiguration.xml, we need to pass the xml file while “adding” the package. But, if we want to apply the UserConfiguration.xml, then also we need to pass the xml file while “publishing” the package.
One more important thing about ACE tool is that we can terminate the child process by defining an executable whose child process is running when the application .EXE process is terminated. This can be done by passing the .exe path under the dynamic deployment configuration tab.
Disclaimer: Developer’s Corner Section of ISHIR blog is contributed and maintained by independent developers. The content herein is not necessarily validated by ISHIR.
- Data Analytics
- Digital Transformation
- Bookkeeping and Accounting Services
- Big Data Analytics
- Microsoft Windows Server
- Open Source
- Managed Security Services
- Artificial Intelligence
- PSD Slicing
- Developers Corner
- Pay Per Click (PPC)
- Mobile Application Development
- Managed Hosting
- Microsoft .NET Custom Development
- Software Testing
- Microsoft SharePoint Development
- Microsoft Windows Azure
- Offshore Development
- Outsourcing Software Development
- Microsoft Office 365
- Non-Profit IT
- Application Virtualization & Packaging
- Digital Marketing
- Search Engine Optimization (SEO)
- Social Media
- Website Development
- Cloud Computing