Changes
Created page
[http://technet.microsoft.com/en-us/library/jj680850.aspx Microsoft App-V] is an application-virtualization product available to Software Assurance customers as part of the Desktop Optimization Pack.
While App-V is technically [http://stealthpuppy.com/app-v-faq-7-is-app-v-an-application-compatibility-solution/ not an application compatibility solution], it can be helpful in getting old or poorly-designed software to work on Windows 7 or Windows 8. Applications packaged for App-V are isolated from each other, so two applications that conflict with each other can run on the same computer. App-V is also very good for deploying software that has a messy or complicated installation or removal process, so long as the software doesn't require DCOM, shell extensions, special drivers or machine-specific customization.
=Client=
==App-V Client 5.0 SP2==
The 5.0 SP2 client requires the [[Microsoft .NET Framework]] 4.5 and [[Microsoft Windows Management Framework]] 3.0. These are [http://blogs.msdn.com/b/astebner/archive/2013/08/27/10444688.aspx included with Windows 8 and Server 2012]. Although [http://blogs.msdn.com/b/oldnewthing/archive/2011/04/04/10149346.aspx Windows is not a .NET Framework delivery channel], App-V is so tightly bound to the operating system that a new App-V will be needed with future Windows releases anyway.
<source lang="xml">
<package id="appv_client" name="Microsoft App-V 5.0 SP2 Client" revision="%PKG_VERSION%" reboot="false" priority="2">
<variable name="PKG_VERSION" value="5.0_SP2"/>
<depends package-id="dotnetfx45" os=".+6\.[0-1]\.\d{4} "/>
<depends package-id="wmf3" os=".+6\.[0-1]\.\d{4}" />
<check type="uninstall" condition="exists" path="Microsoft Application Virtualization (App-V) Client 5.0 Service Pack 2"/>
<!-- Edit this as required in your environment. See
http://technet.microsoft.com/en-us/library/jj713460.aspx
for details-->
<install cmd=""%SOFTWARE%\AppV\%PKG_VERSION%\Client\appv_client_setup.exe" /ACCEPTEULA /MUOPTIN /q"/>
<upgrade include="install"/>
<remove cmd=""%SOFTWARE%\AppV\%PKG_VERSION%\Client\appv_client_setup.exe" /UNINSTALL /q"/>
</package>
</source>
=Deploying App-V Packages=
Once the client is installed, it can operate with an App-V server or in [http://blogs.technet.com/b/virtualvibes/archive/2013/03/12/app-v-5-0-standalone-mode-adding-and-publishing-a-package.aspx stand-alone mode]. With a server, there is no WPKG involvement once the client has been installed and configured. Without an App-V server, WPKG either delivers MSI packages or executes PowerShell scripts to inform the client of new App-V packages. Don't mix MSI and PowerShell deployment: pick one for your environment and stick with it.
== Deployment with PowerShell ==
Deployment with PowerShell uses two steps: first, the package is added with <code>Add-AppvClientPackage</code>, and then it is published with <code>Publish-AppvClientPackage</code>. Typically you'll use the <code>-Global</code> flag to publish a package to all users, but you could use a login script or a script dropped into the Start menu to publish packages to only the logged-in user instead.
You may want to use <code>Mount-AppvClientPackage</code> to cache the package to local disk so that it will work even if the network is disconnected the first time the user tries to run the program. This is not necessary if you specify a PKG_PATH that will be available the first time the user tries to run the program.
=== Package template ===
This template will work for a typical App-V package. Change the ID, the name and the two variables.
<source lang="xml">
<package
id="MyPackage"
name="MyPackage via App-V"
revision="4"
reboot="false"
priority="2">
<depends package-id="appv_client" />
<variable name="PKG_PATH" value="%SOFTWARE%\AppV\packages\MyPackage\MyPackage.appv" />
<variable name="PKG_SHORTNAME" value="MyPackage" />
<check type="execute" path="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; if (get-appvclientpackage -name $env:PKG_SHORTNAME ) { exit 0 } else { exit 1 }"" condition="exitcodeequalto" value="0" />
<!-- The mount-appvclientpackage command caches the package locally and can be removed if undesired -->
<install cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; if (add-appvclientpackage -path $env:PKG_PATH | publish-appvclientpackage -Global | mount-appvclientpackage ) { exit 0 } else { exit 1 }"" condition="exitcodeequalto" />
<upgrade include="install" />
<remove cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; unpublish-appvclientpackage $env:PKG_SHORTNAME; remove-appvclientpackage $env:PKG_SHORTNAME" />
</package>
</source>
=== Additional information ===
If you require additional features or if you're using connection groups (sets of AppV packages that share an environment), see:
* Microsoft documentation
** [http://technet.microsoft.com/en-us/library/jj721446.aspx How to deploy App-V 5.0 Packages Using Electronic Software Distribution]
** [http://technet.microsoft.com/en-gb/library/dn508409.aspx How to Manage an App-V 5.0 Package Running on a Stand-Alone Computer Using PowerShell]
** [http://blogs.technet.com/b/appv/archive/2012/12/03/app-v-5-0-client-powershell-deep-dive.aspx App-V 5.0 Client PowerShell Deep Dive]
** [http://blogs.technet.com/b/virtualvibes/archive/2013/03/12/app-v-5-0-standalone-mode-adding-and-publishing-a-package.aspx App-V 5.0 Standalone Mode]
* Useful third-party scripting resources
** [http://stealthpuppy.com/appvrecipes/ App-V Recipes & Tips]
** [http://www.softgridblog.com/?p=181 New! Powershell in App-V 5; some example scripts], especially valuable if you've used App-V 4
** [http://myitforum.com/myitforumwp/2013/10/21/powershell-script-to-test-app-v-5-0-packages/ PowerShell Script to test App-V 5.0 Packages]
= Sequencing =
To save time, sequencing a package should be performed on a virtual machine. Install and patch the base operating system, then install the sequencer and then take a snapshot. You'll revert to this snapshot every time you want to sequence a new package or edit an existing package. '''Do not install WPKG on the sequencing VM'''.
See the article [http://technet.microsoft.com/en-us/library/jj713438.aspx Creating and Managing App-V 5.0 Virtualized Applications] for further details.
[[Category:Silent Installers]]
[[Category:Microsoft software]]
While App-V is technically [http://stealthpuppy.com/app-v-faq-7-is-app-v-an-application-compatibility-solution/ not an application compatibility solution], it can be helpful in getting old or poorly-designed software to work on Windows 7 or Windows 8. Applications packaged for App-V are isolated from each other, so two applications that conflict with each other can run on the same computer. App-V is also very good for deploying software that has a messy or complicated installation or removal process, so long as the software doesn't require DCOM, shell extensions, special drivers or machine-specific customization.
=Client=
==App-V Client 5.0 SP2==
The 5.0 SP2 client requires the [[Microsoft .NET Framework]] 4.5 and [[Microsoft Windows Management Framework]] 3.0. These are [http://blogs.msdn.com/b/astebner/archive/2013/08/27/10444688.aspx included with Windows 8 and Server 2012]. Although [http://blogs.msdn.com/b/oldnewthing/archive/2011/04/04/10149346.aspx Windows is not a .NET Framework delivery channel], App-V is so tightly bound to the operating system that a new App-V will be needed with future Windows releases anyway.
<source lang="xml">
<package id="appv_client" name="Microsoft App-V 5.0 SP2 Client" revision="%PKG_VERSION%" reboot="false" priority="2">
<variable name="PKG_VERSION" value="5.0_SP2"/>
<depends package-id="dotnetfx45" os=".+6\.[0-1]\.\d{4} "/>
<depends package-id="wmf3" os=".+6\.[0-1]\.\d{4}" />
<check type="uninstall" condition="exists" path="Microsoft Application Virtualization (App-V) Client 5.0 Service Pack 2"/>
<!-- Edit this as required in your environment. See
http://technet.microsoft.com/en-us/library/jj713460.aspx
for details-->
<install cmd=""%SOFTWARE%\AppV\%PKG_VERSION%\Client\appv_client_setup.exe" /ACCEPTEULA /MUOPTIN /q"/>
<upgrade include="install"/>
<remove cmd=""%SOFTWARE%\AppV\%PKG_VERSION%\Client\appv_client_setup.exe" /UNINSTALL /q"/>
</package>
</source>
=Deploying App-V Packages=
Once the client is installed, it can operate with an App-V server or in [http://blogs.technet.com/b/virtualvibes/archive/2013/03/12/app-v-5-0-standalone-mode-adding-and-publishing-a-package.aspx stand-alone mode]. With a server, there is no WPKG involvement once the client has been installed and configured. Without an App-V server, WPKG either delivers MSI packages or executes PowerShell scripts to inform the client of new App-V packages. Don't mix MSI and PowerShell deployment: pick one for your environment and stick with it.
== Deployment with PowerShell ==
Deployment with PowerShell uses two steps: first, the package is added with <code>Add-AppvClientPackage</code>, and then it is published with <code>Publish-AppvClientPackage</code>. Typically you'll use the <code>-Global</code> flag to publish a package to all users, but you could use a login script or a script dropped into the Start menu to publish packages to only the logged-in user instead.
You may want to use <code>Mount-AppvClientPackage</code> to cache the package to local disk so that it will work even if the network is disconnected the first time the user tries to run the program. This is not necessary if you specify a PKG_PATH that will be available the first time the user tries to run the program.
=== Package template ===
This template will work for a typical App-V package. Change the ID, the name and the two variables.
<source lang="xml">
<package
id="MyPackage"
name="MyPackage via App-V"
revision="4"
reboot="false"
priority="2">
<depends package-id="appv_client" />
<variable name="PKG_PATH" value="%SOFTWARE%\AppV\packages\MyPackage\MyPackage.appv" />
<variable name="PKG_SHORTNAME" value="MyPackage" />
<check type="execute" path="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; if (get-appvclientpackage -name $env:PKG_SHORTNAME ) { exit 0 } else { exit 1 }"" condition="exitcodeequalto" value="0" />
<!-- The mount-appvclientpackage command caches the package locally and can be removed if undesired -->
<install cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; if (add-appvclientpackage -path $env:PKG_PATH | publish-appvclientpackage -Global | mount-appvclientpackage ) { exit 0 } else { exit 1 }"" condition="exitcodeequalto" />
<upgrade include="install" />
<remove cmd="powershell -executionpolicy bypass -noprofile -command "&Import-Module AppvClient; unpublish-appvclientpackage $env:PKG_SHORTNAME; remove-appvclientpackage $env:PKG_SHORTNAME" />
</package>
</source>
=== Additional information ===
If you require additional features or if you're using connection groups (sets of AppV packages that share an environment), see:
* Microsoft documentation
** [http://technet.microsoft.com/en-us/library/jj721446.aspx How to deploy App-V 5.0 Packages Using Electronic Software Distribution]
** [http://technet.microsoft.com/en-gb/library/dn508409.aspx How to Manage an App-V 5.0 Package Running on a Stand-Alone Computer Using PowerShell]
** [http://blogs.technet.com/b/appv/archive/2012/12/03/app-v-5-0-client-powershell-deep-dive.aspx App-V 5.0 Client PowerShell Deep Dive]
** [http://blogs.technet.com/b/virtualvibes/archive/2013/03/12/app-v-5-0-standalone-mode-adding-and-publishing-a-package.aspx App-V 5.0 Standalone Mode]
* Useful third-party scripting resources
** [http://stealthpuppy.com/appvrecipes/ App-V Recipes & Tips]
** [http://www.softgridblog.com/?p=181 New! Powershell in App-V 5; some example scripts], especially valuable if you've used App-V 4
** [http://myitforum.com/myitforumwp/2013/10/21/powershell-script-to-test-app-v-5-0-packages/ PowerShell Script to test App-V 5.0 Packages]
= Sequencing =
To save time, sequencing a package should be performed on a virtual machine. Install and patch the base operating system, then install the sequencer and then take a snapshot. You'll revert to this snapshot every time you want to sequence a new package or edit an existing package. '''Do not install WPKG on the sequencing VM'''.
See the article [http://technet.microsoft.com/en-us/library/jj713438.aspx Creating and Managing App-V 5.0 Virtualized Applications] for further details.
[[Category:Silent Installers]]
[[Category:Microsoft software]]