Blog > Liquit Automation and VMware AppCapture

Recently Liquit has been working closely with VMware’s App Volumes team to learn how to use new automation features introduced in the VMware AppCapture 4 tool to simplify the process of creating what are called Packages for App Volumes 4.

Using VMware Workstation and Liquit Automation we came up with a fairly simple process to create App Volumes packages automatically. This process uses a Virtual Machine in which the AppCapture tool is installed, Liquit Managed Packages and a Liquit Deployment.

In the example below we’ve used a Liquit Deployment called ‘VMware App Attach Adobe Reader DC’ which uses two Adobe Reader DC managed packages which have been created using the Liquit Setup Store connector.

Then the Liquit agent and an agent configuration file similar to the one described in Liquit Automation and Deployment have been used to start the deployment process:

Two .cmd files are used to start both the Virtual Machine and the capture process:
StartAppCap.cmd and StartAppCapturePackaging.cmd.

StartCappCap.cmd uses vmrun to start a VMware Workstation Virtual Machine in which the Liquit Agent and the AppCapture tool already have been installed. After the Virtual Machine has been started, it copies the agent.xml and StartAppCapturePackaging.cmd into the Virtual Machine.

@echo off
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" start "f:\Windows 10 x64\Windows 10 x64.vmx"

rem ----
rem  '50' is the time it takes for the Virtual Machine to launch and to wait before the AutoLogin
TIMEOUT /T 50 /NOBREAK

rem --------------------
rem Copy all files to the Virtual Machine
rem --------------------
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" -gu "Roel" -gp "P@ssw0rd" copyFileFromHostToGuest "f:\Windows 10 x64\Windows 10 x64.vmx" "e:\StartAppCapturePackaging.cmd" "c:\users\roel\desktop\StartAppCapturePackaging.cmd"
TIMEOUT /T 5 /NOBREAK
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" -gu "Roel" -gp "P@ssw0rd" deleteFileInGuest "f:\Windows 10 x64\Windows 10 x64.vmx" "C:\Program Files (x86)\Liquit Workspace\Agent\Agent.xml"
TIMEOUT /T 5 /NOBREAK
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" -gu "Roel" -gp "P@ssw0rd" copyFileFromHostToGuest "f:\Windows 10 x64\Windows 10 x64.vmx" "e:\Agent.xml" "C:\Program Files (x86)\Liquit Workspace\Agent\Agent.xml"
TIMEOUT /T 5 /NOBREAK

rem --------------------
rem run AppCapture
rem --------------------
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" -gu "Roel" -gp "P@ssw0rd" runProgramInGuest "f:\Windows 10 x64\Windows 10 x64.vmx" -activeWindow -interactive "c:\users\roel\desktop\StartAppCapturePackaging.cmd"


Then the last command is used to start ‘StartAppCapturePackaging.cmd’ which looks like this:

@echo off

rem ----
rem  a VMware App Volumes Package called 'Adobe Reader DC.vhd' will be created on the local disk in the c:\AvPackages directory
rem  and a capture session is started
rem ---
if not exist "c:\avpackages" mkdir "c:\avpackages"

"C:\Program Files (x86)\VMware\AppCapture\appcapture.exe" /New "Adobe Reader DC" /o \\desktop-uck1gn9\c$\AvPackages\
TIMEOUT /T 2 /NOBREAK

rem ----
rem  this will start a Deployment called "VMware App Attach Adobe Reader DC" 
rem ---

"C:\Program Files (x86)\Liquit Workspace\Agent\ShellAPI.exe" deployment run "VMware App Attach Adobe Reader DC"
TIMEOUT /T 2 /NOBREAK

rem ----
rem  a VMware App Volumes Package will be created on the local disk in the c:\AvPackages directory
rem ---

"C:\Program Files (x86)\VMware\AppCapture\appcapture.exe" /end

Recommended reading:

The Three Components of Liquit Release & Patch Management.

How to create a managed package for a selected Setup Store title.

Receive e-mail notifications about updated managed packages.

Liquit Setup Store

Please contact our sales team to try Liquit Release & Patch Management free of charge for 30 days.

About the author