Sequencing VLC Media Player using App-V 5.1

1)  Launch the Microsoft Application Virtualization Sequencer from Start-> All Programs




2)  Select the create package (default) option.


3) Select the "Standard application" type in the type of application to be sequenced.


4)  Select "Perform a custom installation" in the select installer screen and click next.


5) Provide the virtual application name as VLC Media Player and click next.


6) Install the VLC Media player application now.





Uncheck Desktop shortcut option.



Uncheck Run Vlc Media Player option and click finish.


7) Once Installation is completed, Select "I am finished Installing" and click next.

                                   

8) In the configure Phase, launch the required shortcuts and perform custom changes if needed and remove unwanted shortcuts.


Here we have removed all unwanted shortcuts other than the main VLC Media Player shortcut. Launched it and unchecked the check for updates and allow network access.Launched it again to make sure everything is captured in feature block 1.


Click Next.


11) Select stop now to create virtual package and click next.


12) Save the package.

Standalone Powershell Testing in the client side:

Execution Policy should be bypassed first.Then enter the below command in PS to publish the VLC Media Player App-V package.

Add-AppvClientPackage "path to .appv file" | Publish-AppvClientPackage -Global | Mount-AppvClientPackage

Shortcut Location:


Shortcut launch:
                                    
                                 

App-V 5.0/App-V 5.1 Applications not launching when selected "RunAs" option

Question: We have an environment where user has separate login account and for testing purpose there is an administrator account to which we as an administrator login to the published applications for troubleshooting. With App-V 5.0, we are unable to launch by shift+Right clicking on the shortcut and selecting "RunAs" option to troubleshoot. This worked exactly as desired in App-V 4.6 The Applications are published through SCCM 2012 for the users. We are not seeing any error when launching the App-V 5.0 shortcuts using "RunAs". When normally double clicking on the shortcut, it launches fine. What might be the reason?


Reason: The reason is, the App-V 5.0/5.1 application has been published for the user through SCCM 2012. When published for a particular user collection, the application will work only for that users. It won't work for other users. This is the reason why "Run as different user" failed to launch the application.


Solution: If you want your Admin account to launch the shortcut, then it should also be added to the  user collection in the SCCM 2012 console or you may want to publish the application globally to the machine so that all the users and the admin account can launch the shortcut properly.


I have added the user/admin account  to the collection and updated the statistics in SCCM 2012, even then I am not able to use "Run as different user". What might be the cause?


If the deployment is made available to the user, then the application needs to be installed first to all the users in the collection then only "Run as different user" will work for that user account.
For example: user A and user B are in the user collection and the application has been deployed to the user group through SCCM 2012. User A logs in and installs the application as it has been made as available. Launches the shortcut and it works fine. Now tries to launch the shortcut using " RunAs" option and entering User B credentials. It fails to load because the application has not been installed to the User B. After installing the application to the User B and tried to launch the shortcut in User A with User B credentials the application launches fine. This is because the application has been installed for User B. This method is not required if the deployment is made as required in SCCM 2012.


NOTE: When published to the users, the "Run as Administrator" option will work properly as desired. Only the "Run as different user" will fail to launch the shortcut correctly.

Internet Explorer getting crashed after upgrading App-V 5.0 SP2 or SP3 to App-V 5.1

After upgrading from App-V 5.0 Sp2 or App-V SP3 to App-V 5.1 , Internet explorer starts crashing for no reason.

The Application event log shows two possible errors:

1.Faulting module : EMET.DLL
2.Faulting module : NTDLL.DLL

This is a known bug with App-V 5.1. Some possible workaround is to either revert back to 5.0 or follow the below steps.

Solution:

Remove the following lines in the registry and IE 10 / IE 11 will stop crashing.

HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / AppV / Client /Virtualization

ProcessesUSingVirtualComponents

Data:

%ProgramFiles%\Internet Explorer\iexplorer.exe

%ProgramFiles(x86)%\Internet Explorer\iexplorer.exe


You can also try removing the App-V 5.0 earlier versions manually and then install App-V 5.1 instead of upgrading to avoid this issue.

Though the above said step is just a workaround, it is not a recommended way to bypass this issue. We need to wait for Microsoft to come up with possible fix or service pack soon.

Technet post - https://social.technet.microsoft.com/Forums/en-US/f1bdd607-dd05-450c-90b7-8fcd8b8bccc1/internet-explorer-1011-hangs?forum=mdopappv&prof=required


Management console generates “Could not load file or assembly Newtonsoft.Json” error - App-V 5.1 Support Tip

After upgrading the App-V 5.0 Service Pack 1 Database and Management Server, the following error is generated when loading the App-V management console:


Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


To know more about resolving this issue click on the below official Microsoft TechNet link:


http://blogs.technet.com/b/appv/archive/2015/10/22/app-v-5-1-support-tip-management-console-generates-could-not-load-file-or-assembly-newtonsoft-json-error.aspx

App-V Support Tip: Publishing Server URL is unreachable after upgrade to 5.1

After upgrading App-V 5.0 Management and Publishing servers to App-V 5.1, you may encounter a problem where publishing no longer function properly and the following issues appear:

- Accessing the Publishing URL in Internet Explorer from directly on the Publishing Server (e.g.http://localhost:82, where 82 is the port assigned to the Publishing Server Service) generates the following error message:

The website cannot display the page

- The event below is seen in Event Viewer\Applications and Servers logs\App-V\Server-Publishing-Private\Debug:
Failed to pre-load publishing metadata. 

Message: Object reference not set to an instance of an object. 
Details:  
Stack Trace: 
   at Microsoft.AppV.Server.Publishing.PublishingMetadataSerializer.PackageSerializer.Load(XElement pkgElement, PublishingMetadata& data) 
   at Microsoft.AppV.Server.Publishing.PublishingMetadataSerializer.RootSerializer.Load(XmlReader reader) 
   at Microsoft.AppV.Server.Publishing.PublishingMetadataSerializer.LoadFromFile(String filePath) 
   at Microsoft.AppV.Server.Publishing.DataManager.ProcessRawMetadata() 
   at Microsoft.AppV.Server.Publishing.DataManager.PreLoadPublishingMetadata() 
   at Microsoft.AppV.Server.Publishing.DataManager..ctor()

To know about the cause and the resolution check the below Microsoft Technet link.


Can we sequence application entries installing to both C:\ Drive and E:\ Drive - App-V 5.0

Question : Consider application entries are going to both C:\ Drive and E:\ Drive ..
In this case whether we can go ahead with sequencing this application? as these both locations entries will be reflecting in VFS.

Answer : App-V 5.0 won't support multiple drive entries. Below you can find an example.

start the sequencing steps using App-V sequencer 5.0 SP3.

1. Select create a new virtual package.


2. Select create package.


3. Select standard package.


4. Select custom installation.


5. Enter the virtual package name as test. Click next. In the monitoring phase, Go to c:\programfiles (x86), create a folder named test1 and add a file. eg:1.jpg.

Go to E:\ drive, create a folder named Test2 and place a text file test2.txt.

6. Click "I am finished monitoring"

                                     

7.Select continue to modify the package option and click next.

8. In the package editor select Package Files tab to see the files that were captured during monitoring phase.


Here you can see that only the file that was kept in c:\programfiles (x86)\test1 has been captured in the VFS. 

Conclusion : App-V 5.0 or App-V 5.1 doesn't support file entries installing to multi drive( c:\ and D:\ ) using the sequencer.

Note: However if your application explicitly needs files to be in D:\ or E:\ drive. Simply extract the files from the package and place it in the SCRIPTS section in the package editor. Write a script to copy them to respective D:\ or E:\ drive in the Add/Publish scripts trigger in Deploymentconfig.xml file.Thanks to troubleshooting enthusiastic Vinod Reddy for pointing out this workaround.

APPV_ROOT and APPV_ROOTS - AppV 5.0

Question : When we open CoW local user location we can see that Application has created many folders. Among them we can see two folders with the same name APPV_ROOT & APPV_ROOTS.What is the difference?Any Special reasons why two folders are created?

Answer : When a virtual application requires to make changes to the files or folders during runtime, it does not make changes in package store (%programdata%\App-V).Instead App-V creates Copy on Write (COW) locations and make changes over there during runtime, CoW support both roaming and non-roaming locations.

Roaming CoW Location - %AppData%\Microsoft\AppV\Client\VFS

Local CoW Location - %LocalAppData%\Microsoft\AppV\Client\VFS

In Local CoW location we can see two folders named APPV_ROOT & APPV_ROOTS created during runtime when shortcut makes changes to files/folders.


The S signifies the restricted location when the virtual service requests the change as a different elevated user from the logged on users. The non-S location stores standard user based changes.
In other words from Steve Thomas - Standard users will read and write from the regular directory (with relaxed ACL’s) while elevated processes will read and write to the “S” version.

In a test lab, we have user A named admin who is the local administrator. Lets create four other users USER 1, USER 2, USER 3, USER 4. Among them USER 1 and USER 2 are made as admins and USER 3 and USER 4 are made as standard users. Now Publish the package to the machine globally. When launching the shortcut in admin(local administrator) the runtime files were created in APPV_ROOTS. Launching the shortcut in USER 1 and USER 2, they made changes to APPV_ROOT. The same happens with USER 3 and USER 4 they make changes to APPV_ROOT folder.

Now let us elevate USER 3 and we can see that the changes were written to APPV_ROOTS.

To conclude folders with 'S' (APPV_ROOTS,Common AppDataS, Common ProgramsS,WindowsS etc) are special restricted folders to which only elevated users/Local admin can make changes to.

How to make App-V package to read from or write to the local registry - Appv 5.0

Question : In some cases, application might require to read or write to the native registry locations. In this case how to proceed with App-V 5.0.

Answer : We can make use of PassThroughPaths key located in HKLM\Software\Microsoft\AppV\Subsystem\VirtualRegistry to read or write to local registry.

Usually when an application is launched it reads registry in the following order.

1. COW location.
2. Package location.
3. Native registry.

If we use PassThroughPaths key it can only be read/write from the native registry, bypassing the Package and COW registry locations. Pass-through locations are global to the machine (Not per package) meaning all virtual packages will make use of the path specified in PassThroughPaths to read or write to the local registry.

How to configure : It can configured by adding the path to the key PassThroughPaths in HKLM\Software\Microsoft\AppV\Subsystem\VirtualRegistry which is a REG_MULTI_SZ (Multi string).



Example we are adding HKLM\Software\Test to the PassThroughPaths so that the virtual application sees or writes only to the local registry.


In this case all published virtual applications will make use of local HKLM\Software\Test to read/write.

List Applications In Use - App-V 4.6 & App-V 5.0

To list applications that are in-use in App-V 4.6 & App-V 5.0 we can use the below scripts.

App-V 5.0:

1. Set execution policy to bypass or unrestricted in elevated Powershell.

2. Run the following command.

Get-AppvClientPackage -all|ft name,InUse

This command will list out applications and their status in the powershell UI.


To export these contents to a text file use the below command.

Get-AppvClientPackage -all|ft name,InUse > c:\Inuse.log

If you need to list Applications that are currently in use alone use the below script.

Create a powershell script Inuse.PS1 with the below lines.

$a=get-appvclientpackage -all
foreach ($b in $a)
{
if ($b.inuse -eq $true)
{
write-host $b.name
}
}

Run the Inuse.PS1 inside the powershell and it will list the application in-use in the powershell UI.

App-V 4.6:

1. Open an elevated CMD and type in the below command.This will create a log file with the applications and their In-Use status along with it.

sftmime query obj:package /global /log c:\VirtualApps.log

Steps to Install .CAB file in windows 7 or 8

Question: How to install .cab file? It is just a compressed archive file containing files inside it. It cannot be executed directly. We can extract the contents from the .cab file but how to install it?

Answer: We can use the build in  pkgmgr.exe (Windows Package Manager) to install the .cab file.

Steps: Open an elevated command prompt and run the following command to install the Cabinet file.
Pkgmgr /ip /m:(path to.cab file) /quiet
Example:


start /w Pkgmgr /ip /m:c:\temp\Windows6.0-KB92xxx-x86.cab /quiet
or
Pkgmgr /ip /m:c:\test.cab /quiet


Pkgmgr /? will show the complete list of commands that can be used. Screenshot below.

                                     


You can also take log file for the Installation and Uninstallation using the /l parameter at the end of the command.

How to write to 64bit registry path from a 32bit MSI using a MST using ORCA tool

In my earlier blog, I posted about how to create a transforms file to install a registry to 64 bit location in 64 bit OS using transforms in a 32 bit vendor MSI using Installshield tool.


So, in this current post I will explain how to achieve this using a simple ORCA tool.


1) Open the MSI using ORCA tool. Select Tansforms from the menu bar and click on New Transforms. This will create a new transforms where you can do the modifications.


2) Add a new row in Component table and create a new component and set the Attribute field to 256 as shown below.


Component attribute 256 - Set this bit to mark the component as a 64-bit component. (https://msdn.microsoft.com/en-us/library/aa368007(v=vs.85).aspx)


uidd43.png




3) Add a row in FeatureComponents table and map the newly created component to an existing Feature.


wiaRBZ.png


4) Go to Registry table and select the registry for which needs to be installed to 64-bit path and set the Component field to the newly created obove component.


OJfpj1.png


5) After doing the changes, select Generate Transforms from the Transforms Menu bar.


s2Jlho.png


6)) Test for the functionality by executing the msi command along with the transforms file.


msiexec.exe /I "path to msi" TRANSFORMS="path to transforms file" /qb!


NOTE: Since the MSI is meant to be 32-bit, you can ignore the ICE 80 error instead of messing up with the MSI and changing its behavior and just document the acceptance of the ICE80.

How to write to 64bit registry path from a 32bit MSI using a MST(Transforms)

Question : I have a 32bit MSI. I want to add a registry. The registry should be installed to 64bit registry section. How I can do it using Transforms in Installshield?


Answer : Make the component having the registry as 64-bit component and change the template summary. Note keep only the registry that needs to be in 64 bit, and move all other files or registry to another component.


Steps:


Using Installshield:


1. Check for the registry that needs to be installed to 64 bit location. Fetch its component name.


mCc65z.png


2. Go to the respective component and make it as 64 -bit as shown below. Do read the instructions pointed below in arrow mark.


fme6Fs.png


3. Save the transforms and validate it for any errors. Since we have added a 64 -bit component,
validation will show ICE 80 error.


cQMqrs.png


4) To resolve the error, go to template summary and change the value to Intel64;1033.


WWEp1Q.png


5) Test for the functionality by executing the msi command along with the transforms file.
msiexec.exe /I "path to msi" TRANSFORMS="path to transforms file" /qb!


NOTE: Since the MSI is meant to be 32-bit, you can ignore the ICE 80 error instead of messing up with the MSI and changing its behavior and just document the acceptance of the ICE80.

LibreOffice 4.1 - Fatal error App-V 5.0

When launching Libre office in the App-V client, it shows fatal error.


Solution:
Check Dan Gough's blog where he has explained the cause for the failure and his workaround Here

Disable file transfer in Microsoft Skype 7.3.0 - MSI

After installing Skype, users can send files to different network by right clicking on file and selecting Skype to send context menu.



In order to prevent file transfer through skype, add the following registry


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype\Phone
add a dword "DisableFileTransfer" with value 1

App-V Support Tip: Installation of App-V 4.6 SP3 client fails with error 0x57

In certain scenarios, installation of the Microsoft Application Virtualization 4.6 Service Pack 3 Client (APP-V 4.6 SP3) fails with the following error:


ProductCode specified: {5D80483C-D297-4E04-9EDF-DD58521E9565};{342C9BB8-65A0-46DE-AB7A-8031E151AF69}
::MsiGetProductInfoW error 0x57.Failed to get ``LocalPackage'' value for product code {5D80483C-D297-4E04-9EDF-DD58521E9565};{342C9BB8-65A0-46DE-AB7A-8031E151AF69}.
SoftGrid Action: SWI41sp1UpgradeFix Details: Child exited with code 87
SoftGrid Action: SWI41sp1UpgradeFix Details: 41sp1UpgradeFix.exe failed with error: 87
SoftGrid Action: SWI41sp1UpgradeFix Details: Action ended
CustomAction SWI41sp1UpgradeFix returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 15:02:57: SWI41sp1UpgradeFix. Return value 3.



Solution:
Check the official TechNet link for the workaround  HERE