If an App-V package has scripts to perform an operation, the application install may fail and show a dialog box similar to the image below.
Checking the AppEnforce.log file will reveal the error as below.
Publish-AppvClientPackage : Application Virtualization Service failed to complete requested operation.
Operation attempted: Publish AppV Package.
Windows Error: 0x2E4 – The requested operation requires elevation
Error module: Embedded Scripting. Internal error detail: 7D401E30000002E4.
Please consult AppV Client Event Log for more details.
In this case the problem is caused because the application is targeting the user and cannot execute the necessary PowerShell commands to run the script which has been embedded in the App-V package. This particular scenario utilizes a demo that I do for customers to install an application compatibility shim as per my blog post “App-V 5.0 Demo – Application Shims“.
With this scripting, it’s best for the package to be globally published (i.e. targeting the computer) and not user published.
Updated 7/16/2015: As pointed out in the comments, the actual problem/solution was found. Instead of using the PublishPackage element of the UserConfig.xml script, use the AddPackage element of the DeploymentConfig.xml script. In that way the PowerShell commands have the permissions to execute.
Filed under: Uncategorized