Tag: xml

  • App-V 5.1 misleading conversion warning (Scripts used during conversion included)

    During my last project I had the chance to convert about a hundred sequences from App-V 4.6 to App-V 5.1. I started out with a script to test if the sequences could be converted by using the Powershell cmdlet Test-AppvLegacyPackage and export the data to xml and then onto an html file. The html file proved to be a great source for reporting purposes. I am sure that the Powershell code can be a lot cleaner, but it suited my needs for the moment.

    Script used to test conversion readiness:


    $Source = "[Input Folder]"
    $Path = "[Temp Folder]"

    If (!(Test-Path $Dest ))
    {
    New-Item -Path $Dest -type directory -Force
    }
    else
    {
    Write-Host "Output Folder already present"
    }

    Get-ChildItem -Path $Source | ForEach-Object {Test-AppvLegacyPackage $_.FullName} | Export-Clixml -Path $Path\Conversion.xml
    pause
    $a = "

    "

    Import-Clixml -Path $Path\Conversion.xml | sort @{expression="Errors";Descending=$true},@{expression="Warnings";descending=$true} | Select-Object Source, Errors, Warnings, Information | convertto-html -head $a -body "< h 3 >Test-AppvLegacyPackage< / h 3 >" | Out-File $Path\Conversion.html

    * remove the spaces before, between and after h and 3 for the correct code.

    When I ran this script it generated a warning for two of the sequences reporting:

    The icon folder for this package is missing. This package will still convert successfully. However, there will be no icons associated with the applications.

    I first checked to see if the icons were in fact missing, but that was not the case. It turned out that the two sequences in question had no valid shortcut entry in the osd file. The osd file just had this entry:

    In App-V 4.6 when an osd file is present without a shortcut entry it is still possible to create an application publication in a user environment tool like RESOne Workspace Manager. In App-V 5.1 the same situation will not result in an application publication in RESOne Workspace Manager because no AppV.Shortcut entry is taken into the xml files. So the solution is quite easy. Just paste in a valid shortcut in the osd file for the warning to disappear and to create a valid AppV.Shortcut entry in App-V 5 xml files.

    Example to create an Orca shortcut entry in the osd file:




    After this change the sequences would no longer generate a warning while tested for conversion readiness and later on were successfully converted and technically tested. Below you will find the script I used to convert the sequences:


    $Source = "[Input Folder]"
    $Dest = "[Output Folder]"

    Get-ChildItem -Path $Source | Test-AppvLegacyPackage | Where-Object {$_.Errors.Count -eq 0 } | Select-Object * , @{n='SourcePath';e={$_.source}} | ConvertFrom-AppvLegacyPackage -DestinationPath $Dest

    $Packages = Get-ChildItem -Path $Dest -Filter "*.appv*"

    foreach ($Package in $Packages) {
    $Name = $Package.Name.substring(0,($Package.Name.length - 5))
    $PackageItems = Get-ChildItem -Path $Dest -Filter "$Name*"
    New-Item -Path $Dest\$Name -Type Directory
    For ($n=0; $n -le $PackageItems.Count -1; $n++) {Move-Item $PackageItems[$n].FullName $Dest\$Name}
    }

    This basically is the script that Aaron Parker posted on his website a long time ago with the addition of information of another blog post that I found. The addition is needed because in the latest versions the Powershell cmdlet expects other output from the previous cmdlet (SourcePath instead of Source).

  • Strange characters in AppV 5.0 xml configuration files

    In AppV 5.0 you can overwrite the default configuration (Appxmanifest.xml in the .appv file) with two external files called DeploymentConfig.xml and UserConfig.xml. At times I would observe strange characters in these two files.

    See the picture below for an example of a file containing these strange characters:

    sequencer_dutch

    The files should look like this:

    sequencer_english

    Today I pinpointed the cause. The strange characters only appear in the files if they are created through a localized version of the sequencer. In my case I have a Windows 7 virtual machine with an english version of the operating system but with a dutch MUI pack installed. The regional settings are set to have dutch menu’s as requested by our customer. This causes the sequencer to have a dutch GUI as well. As soon as a sequence is saved through the dutch localized version of the sequencer the files have strange characters. On a second Windows 7 virtual machine without a dutch MUI pack (or regional settings altered to allow for english menu’s) I edited the sequence and saved it without changing anything. The files had no strange characters in them. As soon as I edited the sequence on the virtual machine with the dutch MUI pack and saved again the strange characters were back.

    Mind you. I have only tested this with a dutch localized version of the sequencer but I am fairly certain this problem exists in all localized versions of the sequencer.