Easy way to collect debug logging data in a text file format - App-V

When ever an issue happens, we tend to look into App-V logs in the eventviewer for more information.The even logs are located at Applications and Services Logs/Microsoft/AppV/<App-V component>

To view the entire logs, select View > Show Analytic and Debug Logs in the Event Viewer. Beginning App-V 5.0 SP3 App-V logs are further consolidated. To know more check in the below link.


https://technet.microsoft.com/en-us/library/dn858700(v=vs.85).aspx#BKMK_event_logs_moved


After enabling analytic and debug logs, you can see the view of the Eventviewer below.





Traversing through these logs to find the issue is quite time taking and tedious. If you know where to look by looking into the error code it is fine. If not then it is complex.


Recently Microsoft has released a KB article which explains how to collect debug trace and give output in a text file. You can use the PowerShell command to collect a debug trace on an App-V 5.0 client, sequencer, or server.


Copy the below code and save it as a Powershell script (Appvlogtrace.ps1)


logman create trace AppVKB3037955Debug -o AppVDebug.ETL -cnf 01:00:00 -nb 10 250 -bs 16 -max 512 -ow -y
$providers = Get-WinEvent -ListProvider *Microsoft-Appv-* | Select-Object Name | Where-Object -Property Name -NotMatch "SharedPerformance"
foreach ($provider in $providers) { logman update trace AppVkb3037955Debug -p $($provider.Name) 0xe000000000ffffff 0x5 | Out-Null }
Logman Start AppVKB3037955Debug

cls
$nil = Read-Host "Please reproduce your issue now. Press [ENTER] when done." 

Logman Stop AppVKB3037955Debug
dir *AppVDebug*.etl | foreach { netsh trace convert $_ overwrite=yes}
Logman Delete AppVKB3037955Debug 

Open an elevated PowerShell window, and then run the PowerShell script to enable tracing and to reproduce your issue.

After executing the script it will prompt the "Please reproduce your issue now" message.Because traces can quickly grow very large, try to reproduce the issue as soon as possible and hit ENTER once the issue is reproduced.






After seeing the above prompt to reproduce the issue, I ran the test command which shows error. (This is just a simple test example . However you can even use this for complex errors too which Trentent Tye has explained in his blog in detail)


Once the issue is reproduced, quickly hit ENTER.


You can see the trace output file in the Dump file location as shown above in AppVDebug_<Number>.txt format.




Trentent Tye Blog - http://trentent.blogspot.ca/2016/03/appv5-pacakge-guid-version-guid-failed.html


Microsoft KB Article - https://support.microsoft.com/en-us/kb/3037955

Sequence Visio Viewer 2010 - App-V 5.1

You can download the source from the below link.
https://www.microsoft.com/en-in/download/details.aspx?id=21701


Before to sequencing the Visio Viewer 2010 application, take some sample drawings created using Visio 2010 that are supported by Visio viewer (files with a .vsd, .vss, .vst, .vdx, .vsx, or .vtx extensions) and place it in desktop or some temp location.





Now start the sequencing steps using App-V sequencer 5.1.

1. Select create a new virtual package.


2. Select create package.



3. Select standard package.



4. Select custom installation and enter the virtual package name.





5. Install the Visio viewer 2010 application.








After Installation, click on any one of the extension(Earlier kept in desktop) which will open up Internet Explorer and show the diagram.








6. Click I am finished Installing and continue to modify using package editor.








7. when you click on Virtual registry tab in package editor you can see the FTA extensions being captured in the registries.





8. Remove the Launch Internet Explorer browser from Shortcut and FTA's tab.





9. You can see the FTA's captured. (.vsd, .vss, .vst, .vdx, .vsx, or .vtx extensions)





10. Save the package and in the test client machine publish the package (user or global) to test the functionality.Click on any of those extensions(files with a .vsd, .vss, .vst, .vdx, .vsx, or .vtx extensions) and see that it opens up in the Internet Explorer successfully.


11. After publishing, you can see that the files with .vsd, .vss, .vst, .vdx, .vsx, or .vtx extensions are changed to question mark as below.





12. This is because there was no icon set for those FTA's in the sequencer. Open the package and edit the FTA's to change the Icon as desired.





13. You can also use the Dynamic configuration files to edit the icon for those FTA's like below. Change the default icon tag to the location of the icon file.


Not able to see App-V 5.1 client GUI - Reason & Solution

Recently I have seen many queries in Technet and other groups about whether there is an App-V 5.1 client GUI available or they couldn't see the client GUI after installing App-V 5.1 client.
So let me clear this confusion first.

Microsoft doesn't provide a client GUI for App-V 5.1.Though it has stated in the below links that there is an UI available for App-V 5.1, it doesn't provide any link to download nor has a separate shortcut which I confirmed by opening the MSI and had a look for any client UI shortcut.

https://technet.microsoft.com/en-us/library/mt346576%28v=vs.85%29.aspx

(Have posted in Technet about this false informations. check HERE.Hope MS will look into it.) 

We already know that it stopped providing GUI from App-V 5.0 SP2. Beginning App-V 5.0 SP2, Microsoft started providing a separate client GUI which can be downloaded from the below link.

Microsoft provides the client GUI as both windows installer (MSI) and App-V format. You can choose which one will suit your requirement. 


Don't get confused as both the files are in .msi formats. The first one is windows installer which installs the client UI (appv_client_ui_setup.msi) and the second one (appv_clientUI_package.msi) just extracts the .appv files.



Even for App-V 5.0 SP3 there was no separate client GUI provided by Microsoft.They asked to use the existing GUI that was provided for App-V 5.0 SP2 and it worked well for SP3 too.


Now the real question which many people asked me is that whether we can use the existing App-V 5.0 SP2 client GUI for App-V 5.1 as there is no UI? Will it work with App-V 5.1?

Yes, would be my answer. I recently tested this in my test lab and found it to be successful.I installed App-V client GUI from the above link in the machine where App-V 5.1 HF2 client is present.
Published some test apps and checked in the client GUI. It was visible. I was able to perform all the functionalities like repair,view applications and connection groups,update,download etc..


If you don't wish to use the GUI, you can use the Powershell commands which comes in handy. 


Also check the AppV_Manage tool provided by Tim Mangan. It works great for App-V 5.1.
(P.S I use this as it is great and I would recommend using it.)

How to create AppPaths for already sequenced application - App-V 5.0

Question: I have an App-V 5.1 sequenced application and I have a requirement. When entering the application name in Run command it should open up the App-V virtual application. For example, when we enter iexplore in Run, it opens up internet explorer.


Solution: You can use the AppPath subsystem in App-v 5.0 and higher. This subsystem exposes the App Path registration of a virtual application to the native operating system. Using this registration, the operating system can find the application’s executable. This feature is usually used by an application to avoid modifying the system PATH environment variable.


Reference - https://blogs.technet.microsoft.com/appv/2013/01/03/microsoft-application-virtualization-5-0-integration/


So how can we implement this in the virtual package? If package has been already sequenced, then you can edit the Dynamic configuration file and add the AppPath subsystem.


<AppPaths Enabled="true">
        <Extensions>
          <Extension Category="AppV.AppPath">
            <AppPath>
              <Name>app.exe</Name>
              <ApplicationPath>[{ProgramFilesX86}]\app\app.exe</ApplicationPath>
              <PATHEnvironmentVariablePrefix>[{ProgramFilesX86}]\app\</PATHEnvironmentVariablePrefix>
              <ApplicationId>[{ProgramFilesX86}]\app\app.exe</ApplicationId>
            </AppPath>
          </Extension>
        </Extensions>
 </AppPaths>



In the below example we have added AppPath subsystem for AstroGrep.exe. After adding and publishing it with the dynamic config file, you can see the AppPath being created in the Local registry. Now when you type Astrogrep in Run command it will open up the virtual AstroGrep package.





If you have published the package to user, then the AppPath will be created in the HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths








If you have published the package globally, then the AppPath will be created in the HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths





To know more about App Path check here - https://msdn.microsoft.com/library/windows/desktop/ee872121#appPaths


Scenario:


What if suppose already a local install of the same application may be a different version with App Path is present and App-V package is published.


The App-V package will replace the App Path and point it to the virtual location of the exe and vice versa. Lets consider an example with Mozilla Firefox.


First a local install of the Mozilla Firefox was done and we can see the App Path for firefox.exe pointing to the local install folder c:\Program Files(x86)\Mozilla Firefox\firefox.exe





Now an App-v package for Mozilla Firefox with App Path subsystem is published globally. You can see that the App Path for firefox.exe has been modified to virtual package location
%AllUSERSPROFILE%\Microsoft\AppV\Client\Integration\21546D08-2EEA-4DE8-8290-C7449E707457\Root\VFS\ProgramFilesX86\Mozilla Firefox\firefox.exe





If you type firefox in Run command now, it will open the virtual package and not the local one as the App Path points to the virtual package exe.


What happens when you unpublish the App-V package first. It will replace the App Path back to the local install location for firefox.exe.





Suppose if the local package is uninstalled first, it will completely remove the App Path registry for firefox.exe. Now when you type firefox in Run, it wont work. In order to bring back the virtual path for firefox.exe in App path, you need to repair the firefox app-v package using Repair-AppvClientpackage -Extensions command.


Sequence Excel addin for Adobe Analytics Report Builder 5.2 - AppV 5.1

There are some possible ways to make sequenced add-on work with the locally installed office product. I have listed them below. You can use whichever method suits your need.


1.Create shortcut to local excel:

Install the Microsoft office product locally in the machine prior to sequencing. Open the sequencer and select Add-on or plugin option.



select I have installed the primary package and click next.



 Enter the virtual package name



Install the Adobe Analytics Add-in .










Create a shortcut for excel during monitoring phase and launch it to verify the Adobe Analytics addin.



End the sequence and save the package. In the client side make sure that Office product is installed locally prior to publishing of Adobe Analytics virtual package.

2. Using /appvve:

Alternatively, if you do not want to create a separate shortcut while sequencing you can make use of /appvve:

Eg: Excel.exe /appvve:ProductID_versionID



Alternatively, if it shows error try like below.

cmd.exe /c START "" "Excel.exe" /appvve:ProductID_versionID (or)

START "" cmd.exe /c Excel.exe /appvve:ProductID_versionID

NOTE: This  needs to be done by editing the target field in the native shortcut.


3. Using Runvirtual:

You can create a registry entry for Excel to load inside the Adobe Analytics virtual environment using Runvirtual. From App-V 5.0 SP3 runvirtual supports both machine and user. i.e you can create entry in HKCU for user also.




UPDATE:
In case if you have multiple excel addon's then follow this link from Steve Thomas.

http://blogs.technet.com/b/gladiatormsft/archive/2013/09/04/app-v-on-virtualizing-multiple-excel-add-ins.aspx

NOTE: The above steps are for locally installed Office product. If office product is virtualized, then you would need to create a connection group.

Also note plug-in package should be published globally to match the global settings of the published Office App-V package. Also verify that the Deployment Configuration File of the plug-in package has the same settings that the Office App-V package has.You can search the Deployment Configuration File for “COM Mode” and ensure that your plug-ins package has that value set as “Integrated” and that both "InProcessEnabled" and "OutOfProcessEnabled" match the settings of the Office App-V package you published. Open the Deployment Configuration File and set the value for Objects Enabled to false.

For more Information, kindly refer the below link.

https://technet.microsoft.com/en-us/library/mt590515.aspx#BKMK_custmz_manage_Office_pkgs

How to remove virtual services captured in package after sequencing - AppV 5.1 & App-V 5.0

Question: I need to remove the service that is in virtual services tab in the package editor, but I am not able to see an option to do it. How to achieve this?


Workaround: If you have failed to remove the services that are not necessary like services that perform auto update during sequencing, then it is not possible to remove it in the package editor.


From the sequencer guide Microsoft Application Virtualization 5.0 Sequencing Guide  :


The Services tab displays the current configuration of virtualized application services and allows for changing the Startup Type, Log On and Dependencies configuration of virtualized services.
Note: The services tab is read-only.  In order to disable a virtual service, set the service?s properties during monitoring using Services.MSC or by utilizing a dynamic configuration file post-sequencing, as described later in this document.


With the release of App-V 5.1, we expected Microsoft will be providing the option to disable/delete the services that are captured in the package editor, but they didn't give us the option. So it is same like App-v 5.0. We need to do it in alternate ways. In this blog, I have taken an example Mozilla Firefox which is having a service Mozilla Maintenance Service which would be auto updating the application to latest version.





Solution 1:


Open the config file (deployment or user) and search for services. In the services tag, change the value from true to false.


       <Services Enabled="false"/>







Option 2:


Open the package with the sequencer and perform an upgrade. Choose custom install. In this phase the sequencer will de-virtualize the package.







Open registry and remove the service present (HKLM\System\CurrentControlSet\Services). This will remove the service getting captured.







End the monitoring phase and save the package. Now when you edit the package using package editor, you can see that the service is not listed.







NOTE: A kind request to the readers,if you support the need for disable/delete the services in the virtual services tab in the package editor, do vote it here App-V User Voice.


Conclusion: With the  next update, at-least we can hope that Microsoft will provide an option to remove the services in the package editor itself.