Sequencing SystemTools Hyena 12.5.2 with App-V 5.1

Copy the installation media locally and launch the sequencer with the EnablePVADControl parameter



Load a sequencing template if you have one – here’s a copy of the one I use



Ensure sequencer is clean and ready i.e. no restarts pending/previous packages captured etc.



Select the installer



Enter name and PVAD  – C:\System-Tools_Hyena_12.5.0_001A



Click Next



Enter the installation directory C:\System-Tools_Hyena_12.5.0_001A



Allow time for installation to complete



Tick the checkbox and click Next



Run Hyena



Enter the registration info



Click OK



Open RegEdit – Browse to HKCU\Software\Adkins Resource\Hyena\Win32 and set AskForNewsletterSignup to 1



Create a key under HKCU\Software\Adkins Resource\Hyena\Advanced called DisableUpdateChecker and set to 1



Click Next



Continue to modify package if you want to clean up further or modify shortcuts etc otherwise save the package


Microsoft App-V 5 Sequencing Template

When sequencing an application it’s handy to have a template with some common file and registry exclusions to save on the cleanup work afterwards.

Copy the xml content below into a text file and save with a .appvt extension. Load this template into the App-V Sequencer before packaging an application.

To load this template launch the Sequencer and select File > Load Template.

Template Code

<?xml version="1.0" encoding="utf-8"?>

<SequencerTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<AllowMU>false</AllowMU>

<AppendPackageVersionToFilename>true</AppendPackageVersionToFilename>

<AllowLocalInteractionToCom>false</AllowLocalInteractionToCom>

<AllowLocalInteractionToObject>false</AllowLocalInteractionToObject>

<FullVFSWriteMode>false</FullVFSWriteMode>

<ExcludePreExistingSxSAndVC>false</ExcludePreExistingSxSAndVC>

<FileExclusions>

<string>[{CryptoKeys}]</string>

<string>[{Common AppData}]\Microsoft\Crypto</string>

<string>[{Common AppData}]\Microsoft\Search\Data</string>

<string>[{Cookies}]</string>

<string>[{History}]</string>

<string>[{Cache}]</string>

<string>[{Local AppData}]</string>

<string>[{LocalAppDataLow}]</string>

<string>[{Personal}]</string>

<string>[{Profile}]\Local Settings</string>

<string>[{Profile}]\NTUSER.DAT.LOG1</string>

<string>[{Profile}]\NTUSER.DAT.LOG2</string>

<string>[{Recent}]</string>

<string>[{Windows}]\Debug</string>

<string>[{Windows}]\Logs\CBS</string>

<string>[{Windows}]\Temp</string>

<string>[{Windows}]\WinSxS\ManifestCache</string>

<string>[{Windows}]\WindowsUpdate.log</string>

<string>[{AppVPackageDrive}]\$Recycle.Bin</string>

<string>[{AppVPackageDrive}]\System Volume Information</string>

<string>[{AppData}]\Microsoft\AppV</string>

<string>[{Local AppData}]\Temp</string>

<string>[{ProgramFilesX64}]\Microsoft Application Virtualization\Sequencer</string>

<string>REGISTRY\USER\Software\Microsoft\EventSystem</string>

<string>[{Windows}]\CSC</string>

<string>[{Windows}]\Prefetch</string>

<string>[{Windows}]\repair</string>

<string>[{System}]\appmgmt</string>

<string>[{AppVSystem32Catroot}]</string>

<string>[{System}]\CCM</string>

<string>[{System}]\config</string>

<string>[{System}]\dllcache</string>

<string>[{System}]\wbem</string>

<string>[{Windows}]\Tasks</string>

</FileExclusions>

<RegExclusions>

<string>REGISTRY\MACHINE\SOFTWARE\Wow6432Node\Microsoft\Cryptography</string>

<string>REGISTRY\MACHINE\SOFTWARE\Microsoft\Cryptography</string>

<string>REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU</string>

<string>REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU</string>

<string>REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams</string>

<string>REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Streams</string>

<string>REGISTRY\MACHINE\SOFTWARE\Microsoft\AppV</string>

<string>REGISTRY\MACHINE\SOFTWARE\Wow6432Node\Microsoft\AppV</string>

<string>REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Microsoft\AppV</string>

<string>REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Wow6432Node\Microsoft\AppV</string>

<string>REGISTRY\USER\Software\Microsoft\SystemCertificates</string>

<string>REGISTRY\USER\SOFTWARE\Microsoft\Tracing</string>

<string>REGISTRY\USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings</string>

<string>REGISTRY\USER\Software\Microsoft\Windows\CurrentVersion\Run</string>

<string>REGISTRY\USER\Software\Microsoft\Windows\CurrentVersion\Runonce</string>

<string>REGISTRY\USER\Software\Microsoft\Windows\CurrentVersion\Uninstall</string>

<string>REGISTRY\USER\SOFTWARE\Policies</string>

<string>REGISTRY\MACHINE\Hardware</string>

<string>REGISTRY\MACHINE\SAM</string>

<string>REGISTRY\MACHINE\Security</string>

<string>REGISTRY\MACHINE\Software\Microsoft\EventSystem</string>

<string>REGISTRY\MACHINE\SOFTWARE\Microsoft\Rpc</string>

<string>REGISTRY\MACHINE\Software\Microsoft\SystemCertificates</string>

<string>REGISTRY\MACHINE\SOFTWARE\Microsoft\Tracing</string>

<string>REGISTRY\MACHINE\SOFTWARE\Microsoft\WBEM</string>

<string>REGISTRY\MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings</string>

<string>REGISTRY\MACHINE\Software\Microsoft\Windows\CurrentVersion\Run</string>

<string>REGISTRY\MACHINE\Software\Microsoft\Windows\CurrentVersion\Runonce</string>

<string>REGISTRY\MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall</string>

<string>REGISTRY\MACHINE\SOFTWARE\Policies</string>

<string>REGISTRY\MACHINE\System\CurrentControlSet\Control\TimeZoneInformation</string>

<string>REGISTRY\MACHINE\System\CurrentControlSet\Services\DHCP</string>

<string>REGISTRY\MACHINE\System\CurrentControlSet\Services\Eventlog</string>

</RegExclusions>

<TargetOSes />

</SequencerTemplate>

Sequencing Deltek Cobra 5.1 with Microsoft App-V 5.0

An issue arises following the sequencing and deployment of Deltek Cobra 5.1 whereby the application fails to launch. After some investigation it turned out that a file named DeltekCobraWorkstation.xml needs to exist within the Cobra 5 installation directory and MUST contain the correct hostname of the machine running the application or it will not launch.

Parameter – <UpdateServer>\\HOSTNAME\CobraWorkstation</UpdateServer>

Obviously this is a problem when using App-V as the hostname of the sequencing machine will be captured within this file during the sequencing process. The solution I used was to write a script which dynamically creates the required file with the correct hostname parameter.

Here is the script I created. You pass it the path and it will generate the file in that location. I didn’t really need to include the ability to pass the path as a parameter as the path ended up just being “..\Root\Cobra 5” however I didn’t realise this when first writing the script as I wasn’t aware that there was an inbuilt folder location that your scripts are stored in by default.

Set objFSO=CreateObject(“Scripting.FileSystemObject”)

‘Get computer name from env variables
set oShell = WScript.CreateObject(“WScript.Shell”)
set oShellEnv = oShell.Environment(“Process”)
computerName = oShellEnv(“ComputerName”)

‘Get file path from parameter and assign to strPath
strPath = WScript.Arguments(0)

‘Create text file overwriting any existing file
if right(strPath, 1) <> “\” then
objFSO.CreateTextFile strPath & “\DeltekCobraWorkstation.xml”, true
else
objFSO.CreateTextFile strPath & “DeltekCobraWorkstation.xml”, true
end if

‘Assign new text file to objFile variable
Set objFile = objFSO.OpenTextFile(strPath & “\DeltekCobraWorkstation.xml”, 2, True)

‘Write a line to the text file
objFile.Write “” & vbCrLf
objFile.Write “” & vbCrLf
objFile.Write ” \\” & computerName & “\CobraWorkstation” & vbCrLf
objFile.Write ” 5.01.746″ & vbCrLf
objFile.Write “”

‘Close the file now we’re done
objFile.Close

I then added the following to the deploymentconfig.xml file and applied it to the App-V application via the management console.

    <UserScripts>
                <StartVirtualEnvironment RunInVirtualEnvironment=”true”>
                                <Path>cscript</Path>
                                <Arguments>writexml.vbs “..\Root\Cobra 5” > %TEMP%\cobra-deploy-log.txt</Arguments>
                                <Wait RollbackOnError=”true” />
                </StartVirtualEnvironment>
    </UserScripts> 

At first I couldn’t get it to work with the sequenced app so I read more into the scripting and found that I had it in the wrong place. I had it in the MachineConfig section under PublishPackage however it needed to be under the UserConfig scripting section and it had to be run as part of StartVirtualEnvironment as this would allow interaction with the Virtual Environment.

To run this script I needed to ensure that scripting had been enabled on the client machines.

Set-AppVClientConfiguration -EnablePackageScripts 1

After that I ran Cobra 5.1 again and the script ran perfectly and brought me to the Cobra logon screen.