Virtual Engine are pleased to announce the version 1.1 release of the App-V 5 Configuration Editor (ACE). This (free) utility provides a simple user interface for editing App-V 5 the machine or user dynamic configuration files without manually hacking the underlying XML files. New in this release is the ability to Add, Delete and Edit shortcuts within the package, as well as various GUI improvements.
We’ve been working hard getting the App-V 5 Configuration Editor (ACE) ready for official release; take a look at the ACE page for a bit more information about why it was developed.
The purpose of this short blog to guide you through the ACE interface. There is an assumption here you have an understanding of the App-V 5 Dynamic Configuration files and how they are used, if not you might want to take a look at this Technet article.
You will notice there are three main buttons in the tool bar as shown below:
Previews the changes that will be made to the App-V XML file before saving. This gives you the ability to check out the structure of the generated XML. It’s probably a good idea to point out here that you don’t need to preview the changes prior to performing a save.
This sections displays the Package Display Name, Package ID and Type of XML file opened, i.e. DeploymentConfig or UserConfig. Here is an example DeploymentConfig.xml opened below:
MAIN CONFIGURATION TABS
Once an App-V 5 configuration XML file has been opened you can then begin to make changes as required using the tabs set out below.
Under the User Configuration tab you can change and view various options and configurations:
Various global options change be changed here if you so desire, e.g. altering the COM integration mode.
This tab allows you to View, Add, Edit or Delete any Shortcuts within the package.
If you want to delete an existing shortcut, simply select the row that contains the shortcut and press delete. Should you wish to add a new shortcut, I’d suggest you copy and paste an existing row and then edit the fields accordingly; we’ve added a context menu to make that task easy, should you not fancy using Ctrl+C and Ctrl+V .
Scripts (User Context)
This is really where ACE starts to make life simple . You can easily define which scripts you’d like to add and to which script actions, e.g. PublishPackage, UnpublishPackage, StartVirtualEnvironment, TerminateVirtualEnvironment, StartProcess and ExitProcess. There is no need to worry about getting the syntax in the XML file right. There are some excellent blogs out there talking about using scripts in App-V 5.0, so I suggest you take a look here at one from Tim Mangan and Microsoft’s own Steve Thompson if you need some further background information.
NOTE: You might have noticed that not all the script actions are available under this tab, that’s simply because those excluded aren’t permitted to run under the User Configuration section of the XML file.
I think most of the options are self explanatory but, it’s good to point out that leaving the Timeout value at 0 means no timeout period will be set, i.e. it will wait indefinitely for it to finish so use with caution.
Under the Machine Configuration tab you can alter global options, configure scripts and control the termination of processes.
NOTE: this tab will only be available when you open a DeploymentConfig.xml file. This is because machine configuration items cannot be set in the UserConfig.xml file.
Here you’ll find any options that can be changed if you so desire.
Terminate Child Processes
You can define the path to an executable, that when closed, will terminate any child process running within the virtual environment.
Scripts (System Context)
Very much like the Scripts tab under User Configuration you can define which scripts you’d like to add to which machine script actions, e.g. AddPackage, RemovePackage, PublishPackage and UnpublishPackage.
NOTE: You might have noticed that not all the script actions are available under this tab, that’s simply because those excluded aren’t permitted to run under the Machine Configuration section of the XML file.
You can view both the source (original) XML and/or preview the generated XML under this tab.
This is simply where you can view your source App-V XML file as it was when you opened it.
Once you click the Preview button this pane will display any changes that will be made to the App-V XML file, giving you the ability to check out the structure of the XML before saving if you wish. NOTE: You don’t have to preview the changes prior to performing a save.
The example below (highlighted in yellow) shows the changes made by ACE in the generated XML format. NOTE: ACE will not highlight the changes in the XML, we’ve done it here for clarity purposes only.
With any luck this brief guide has given you a good overview of how to use ACE and hopefully you’ll agree its pretty intuitive to use and should make editing the App-V 5 Dynamic Configuration files a lot, lot easier (well we think so anyway!)? 🙂
DISCLAIMER: THE APP-V CONFIGURATION EDITOR IS FREE TO USE AT YOUR OWN RISK, WE CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE IT MIGHT CAUSE.
Following on from Part 1, we can also query the properties of an App-V 5.0 .APPV package with another cmdlet included in the Virtual Engine App-V 5.0 .APPV PowerShell CmdLets; Get-AppV5FilePackage. The main difference with this cmdlet (when compared to Get-AppV5FileXml and Get-AppV5FileXmlPackage) is that it returns a custom PSObject with a simpler property namespace and additional package information.
To populate our object we can run this:
[code]C:\PS> $AppVPackage = Get-AppV5FilePackage –AppV C:\Mozilla_Firefox_v17.0.appv[/code]
Going back to our example in Part 1, we can then query this object for both the VersionId and PVAD like so:
[code]C:\PS> $AppVPackage | Select-Object VersionId,FileSystemRoot | Format-List
VersionId : fd215f39-f317-447d-aa79-7fe6c35e73f6
FileSystemRoot : C:\Program Files\Mozilla Firefox[/code]
Our custom PSObject also includes details of all the files in package and the uncompressed size. If you want to know how much space a package will take when loaded into the App-V 5 client cache, then this is the command for you!
To return the uncompressed package size we could run:
If you want this in MB, easy:
Want the total number of files in the package?
Need a list of all the files in the .APPV package?
[code]C:\PS> $AppVPackage.Files | Select-Object FullName
So you have an App-V 5.0 package (in this example I’ll use Mozilla Firefox) and you’d like to know various properties about the package without loading it into the App-V 5 client. The sequencer creates numerous files by default that expose some extremely pertinent information, i.e. the PackageId. The PackageId is specified in both the template <PackageName>_DeploymentConfig.xml and <PackageName>_UserConfig.xml files.
Unfortunately for us, other useful details such as the VersionId and Primary Virtual Asset Directory (PVAD) are stored within the <PackageName>.appv file. This is a compressed archive and can simply be opened with Windows Explorer by renaming the file with a .ZIP extension. Within this file are some more files (generated by the Sequencer):
If we want to find out information such as the VersionId or Primary Virtual Asset Directory (PVAD directory) without loading the package into the App-V 5.0 client, we have to manually rename the file, open the archive and inspect the various files (AppxManifest.xml for the VersionId and FileSystemMetadata.xml for the PVAD). Whilst this is fine, it is manual and if we forget to rename the file back to a .APPV file we leave the package unusable!
This is what the Virtual Engine App-V 5.0 Package PowerShell CmdLets are for! Included are three CmdLets that can help us here: Get-AppV5FileXml, Get-AppV5FileXmlPackage and/or Get-AppV5FilePackage. This post covers the first two and Part 2 of this post covers the Get-AppV5FilePackage command.
This cmdlet will extract the contents of a single XML file within an .APPV package. The results are returned as a System.Xml.XmlDocument that we can then interrogate. No more manually renaming the archive, extracting and then loading the file.
Going back to our example, if we wanted the VersionId of an .APPV package we need to interrogate the AppxManifest.xml file. To accomplish this we can run this command (all on a single line!):
[code]C:\PS> (Get-AppV5FileXml –AppV C:\Mozilla_Firefox_v17.0.appv –XML AppxManifest).Package.Identity.VersionId
If we want the PVAD directory, this is stored in the FileSystemMetadata.xml file. Easy (again, all on a single line!):
[code](Get-AppV5FileXml –AppV C:\Mozilla_Firefox_v17.0.appv –XML FilesystemMetadata).Metadata.FileSystem.Root
C:\Program Files\Mozilla Firefox
This method loads each file into it’s own XmlDocument. Is there a way to load all the XML properties at once? You betcha!
This command bundles all the default sequencer generated XML files into a single XmlDocument object. This includes the contents of the AppxManifest.xml, StreamMap.xml, AppxBloackMap.xml, PackageHistory.xml and FileSystemMetadata.xml files. Each XML file is loaded under the <AppV5> element within the XML document and therefore, the paths are extended slightly.
Taking our example, if want to get the VersionId and PVAD we can do this instead:
[code]C:\PS> $Mozilla = Get-AppV5FileXmlPackage –AppV C:\Mozilla_Firefox_v17.0.appv
C:\Program Files\Mozilla Firefox