Thursday, April 28, 2016

Windows 10 Build 14327 - Enabling or Disabling AppV/Uev shows success or failure status

Earlier in my previous blog I have mentioned that Enable-AppV, Disable-AppV, Enable-UeV, Disable-UeV commands in powershell doesn't show any success or failure result.

http://app2pack.blogspot.in/2016/04/app-v-ue-v-available-by-default-in-new.html

Recently Microsoft has released its windows 10 build 14327 insider preview release. So had a chance to test this case. when tested it shows the result that the App-V/Ue-V was successfully enabled/disabled. Finally there won't be any confusion whether the service is actually enabled or not.



NOTE: Reboot will be required when enabling/disabling.

Project Centennial - First hands on Converting desktop apps to Universal Windows Platform (UWP)

There was a huge expectation about the Project Centennial also famously known as Project C. I promise it will not disappoint any of you. I was very eager to have my hands on it and experiment it more and so here I am explaining the conversion steps in detail with a test desktop app.

Prior to conversion one should know the advantages of converting desktop apps to UWP. To know more check the below link.

https://msdn.microsoft.com/windows/uwp/porting/desktop-to-uwp-root

Microsoft has released its pre-release version of Desktop App Converter tool which can be used to convert all the existing desktop apps written for .NET 4.6.1 or Win32 to the Universal Windows Platform (UWP).

Desktop App Converter tool converts a desktop Windows installer such as MSI or EXE to an AppX package that can be deployed to a Windows 10 desktop.

Requirements:

1. Windows 10 Build 10.0.14316.0 or higher(Should be installed physically. Converter will fail in a VM image)
2. Desktop App Converter ( Download - Here )
3. Windows Software Development Kit (SDK) for Windows 10 ( Download Here )

The Desktop App Converter will download two files. BaseImage-14316.wim and
DesktopAppConverter.zip.Extract the DesktopAppConverter.zip files to a desired location.


You can see that there are two files (DesktopAppConverter.cmd and DesktopAppConverter.ps1) DesktopAppConverter.cmd is a cmd wrapper for DesktopAppConverter.ps1.To know more type DesktopAppConverter.cmd -? You can use either CMD or Powershell file for converting purposes.


Now lets convert a test desktop app. Here I am going to use Notepad++ to convert into UWP.
 
Open Powershell as admin and set the execution policy to unrestricted or bypass.



Enter the below command in the Powershell.The setup command will make the Converter to expand the given base image(BaseImage-14316.wim). To know more about these parameters have a look at the below article.

https://msdn.microsoft.com/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter


"path to DesktopAppConverter.ps1" -Setup -BaseImage "path to BaseImage-14316.wim"

If it asks for reboot,Restart the machine and run the command again.

Also note that if you give the absolute path for the DesktopAppConverter.ps1 it will fail. You would need to give the relative path to make it work properly.





It will take some time to expand the base image, so you would need to wait patiently.
It expands the base image to the below path.



Enter the below command to perform conversion in an elevated Powershell.
"path to DesktopAppConverter.ps1" Installer "C:\test\npp.6.8.2.Installer.exe" -InstallerArguments "/S" -Destination "C:\Output\notepadplusplus"
-PackageName "Notepadplus" -Publisher "CN=Notepadplusplus" -Version 6.8.2.0 -ExpandedBaseImage C:\ProgramData\Microsoft\Windows\Images\BaseImage-14316 -Verbose -LogFile "c:\notepad.log"

Make sure you do not keep any other application in the folder. keep only the application that needs to be converted in the Installer location. In this case only notepad++ installer exe should be kept.








This command will run the notepad++ Installer silently in an isolated environment using a clean base image which we downloaded along with the converter(We have expanded the WIM image earlier). It will capture all the changes like registry and file system I/O made by the notepad++ installer and packages it as part of the output.

You can see the verbose log in the screen as we have used -verbose parameter. Also a log file will be generated in the C:\ drive as we have explicitly mentioned in the above command using -LogFile parameter.


So what happens exactly when running the above script. will see more (Refer the above screenshots while reading the below steps for easy understanding).
  1. The script does a Pre-Requisite check like checking Minimum Windows Version,PowerShell Version etc..
  2. It Validates the given parameters like Installer presence, Output Folder presence (If it is not there it will create the folder)
  3. It will Setup Conversion Environment for Capturing.
  4. It Creates AppX Manifest file. This acts as the Core DNA of the Application. It is the Metadata for the package that contains all the required information including extension points, FTA's, shortcuts and the identity names associated with the package.You can customize this file for any changes to be made after capturing the package.
  5. It Generates Virtual File System (VFS). All the files that are captured will be placed here.Additionally there will be Assets Folder which contains Icons [This is created by the Converter].If you are working on App-V then you can relate these things as both are quite same.
  6. It Generates Virtual Registry System (Registry.dat). It Contains all the registry changes that were made by the Installer.
Output – Below is the image of the output that we get,




Assets folder contains the icons for the package. By default it shows X symbol (I guess this will be rectified in the original release). You would need to change these to original icons. Just extract the icons and replace them here with the same name, so that there will be no changes required to modify the AppXmanifest file further.




If we want to create .AppX Package then we need to follow the below steps.

Use MakeAppX.exe to convert to Appx format (It will be available as a part of Windows SDK)


MakeAppx.exe Pack -d "Path of Directory Containing the VFS, Registry.Dat & AppXManifest.xml"-p "Path to output folder"



This will build the loose files to a single AppX package .



In-order to deploy and test the .appx package using the Add-AppxPackage cmdlet, it requires that the application package (.appx) must be signed. For this we can use SignTool.exe, which comes with the Microsoft Windows 10 SDK.





Once signed (you can use a dummy certificate for this step), you can install it successfully.

Testing :Open elevated powershell and run the below command.


Add-AppxPackage "Path to .AppX File"

This will install the package successfully.


NOTE:

At present the Desktop App Converter supports the conversion process only on a 64-bit OS. You can deploy the converted .appx packages to a 64-bit OS only. Desktop App Converter requires the desktop installer to run under unattended mode.

MVP Tim Mangan has mentioned in his blog that there is a bug in the converter.If you give it a MSI based installer, it ignores the command line parameters that you provide and injects it’s own.To know more check his official blog page.(Interesting read :) )
http://www.tmurgent.com/TmBlog/?p=2448
Also check the review from MVP Rory Monaghan about Project C in his blog below.
http://rorymon.com/blog/?p=3490
Also check the blog post from Simon Binder below.
https://bindertech.wordpress.com/2016/04/08/get-started-with-project-centennial/

You can also watch the below video from Microsoft Channel9  to know more about the use of Desktop App Converter tool to convert desktop apps to UWP with demo.


To know more check the below official link from Microsoft.

https://developer.microsoft.com/en-us/windows/bridges/desktop
 

Tuesday, April 19, 2016

HF3 for App-V 5.1 & HF2 for UE-V 2.1 SP1

Hot fix 3 for App-V 5.1 and Hot fix 2 for Ue-V 2.1 SP1 released for public today.Check the official link for more details.

https://support.microsoft.com/en-us/kb/3144445

Friday, April 15, 2016

Unpublishing shows App in use error even when there is no application process running in task manager - Reason

Question: Even though when application is closed and no process or child process is running behind, unpublishing the package still shows application is in use and creates a Pending Task entry in the registry key. What is the reason? why it fails?

Answer: This issue is happening because of the Dynamic Virtualization (Just In Time virtualization) provided by the App-V 5.0 SP2 and higher. There are some applications like office, visio etc which has shell integration's that tightly integrates with the Explorer and Internet Explorer by default and are processed to use the virtual components. This is to enable support for enhanced shell extensions like context menu, drag and drop handler, drop target handler,data object handler,property sheet handler,infotip handler,column handler and preview handler.

Closing the running application, Internet explorer and trying to unpublish still shows "App in use" error.Even if we try to run the Stop-AppvClientPackage command in an elevated powershell, it will kill the running application and the Explorer to which the shell is hooked. The explorer which got closed earlier in turn will automatically restart quickly, and so making the package to be in use.You can check this using Process Explorer and searching for AppvEntsubSystems32.dll or AppvEntsubSystems64.dll. This will reveal the process that is using them.







Also you can check in CMD by using the below commands.


Listdlls.exe -v -d AppvEntsubSystems32.dll (or)
Listdlls.exe -v -d  AppvEntsubSystems64.dll 

Listdlls.exe is available with sysinternals tool. You can download it from here.

https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx






You can see that explorer.exe and Iexplore.exe are present by default in the ProcessUsingVirtualcomponents key in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\Virtualization



Thursday, April 14, 2016

Resolution - App-V generated MSI shows Client version 5.0 or above needs to be installed even though App-V Client is enabled in Windows 10 Build 14316

Even though App-V client is installed and been enabled, running the App-V generated msi shows the below error.



Resolution: Create a transforms for the generated MSI and remove the highlighted Installed OR APPV_CLIENT_INSTALLED launch condition.This should fix the issue temporarily.
For a permanent fix we need to wait for Microsoft to release its updated OS.


App-V & Ue-V available by default in the new Windows 10 build 14316 - First hands on review

As everyone would have already known the earlier news that Microsoft has planned to incorporate App-V in its new windows 10 release Redstone 1. Recently Microsoft has released its insider preview release for Windows 10 Build 14316. I had an opportunity to test it. Below are some interesting findings.

1. We can see the App-V files present in the C:\windows\System32 folder. One can think why Microsoft has kept the files like this instead of keeping them in a separate folder?  (Ex: C:\windows\System32\App-V). Though we were not able to get answers, we have to wait for Microsoft to give its reason.


 

2. The same applies to Ue-V files. They are also present inside the same C:\windows\System32 folder and not in a separate folder (Ex: C:\windows\System32\Ue-V). .



3. Next we tested publishing some sample apps. it wasn't successful. The reason was that the App-V Client service was disabled by default. Turning the App-V client services manually ON worked for us. We can start the service manually to make the App-V client to work but we didn't want to. We wanted to try some other options.



4. Entering gcm -module AppVClient will return the available App-V commands.



We saw that there is a command Enable-App to enable the App-V client service. We opened elevated powershell and typed in Enable-AppV, but it didn't return anything.So we had a thought that the command didn't work.Checked the Appv client service and it seems to be have started.Reboot might be required for proper functionality.



Note: If it doesn't work, then we need to import the AppVClient first using the PS command Import-Module AppVClient to make it work. (Thanks to Roy Essers)

Also note that these commands need to be tested in x64 version of Powershell. If not it will show error.




Published an application and it works fine as expected.



You can also use the Disable-AppV command to disable the App-V Client.



So we can finally say that the Enable-AppV and Disable-AppV command works but it doesn't give any status output whether it is a success or failure. Hope Microsoft will fix this in its upcoming release.

Even though when App-V client is enabled, running the App-V sequenced windows installer (.msi) file generates the below error.





For now removing the Launch condition from the MSI worked. To know more check here.Hope Microsoft will rectify this issue too.

To Enable Ue-V, you need to use Enable-Uev command in an elevated powershell.




Note: If it doesn't work, then we need to import the UEV first using the PS command Import-Module UEV to make it work.

To disable Ue-V, you need to use Disable-Uev command in an elevated PS.



To finalize Windows 10 Redstone 1 will be a great one with in-build App-V & Ue-V.

Also check the below blogs by other App-V Gurus.

Blog by Aaron Parker.

http://stealthpuppy.com/enable-appv-uev-windows-10/

Blog by Ryan Bijkerk

http://www.logitblog.com/microsoft-app-v-built-in-windows-10/

Blog by Vinod Reddy

https://vinodreddy597.wordpress.com/2016/04/14/enable-appv-posh-in-build-14316/

Tuesday, April 5, 2016

Sequence WinZip 19 - App-V 5.1

Download the source and extract the windows installer (.msi) file from %temp% location.

Start the sequencing step using App-V 5.1 Sequencer.

1. Select create a new virtual package.



2. Select create package.


3. Select standard package.


4. Select custom installation.


5. Type the name of the virtual package as WinZip 19.0.



Click Next and run the installation of the msi file in the CMD as shown below.

 

If you want to customize further using the PUBLIC Properties during installation with the msi, have a look in the below links.

http://kb.winzip.com/kb/entry/11
http://kb.winzip.com/kb/entry/229/

Remove the desktop shortcut.

6. Click I am finished Installing once installation is completed.



















7. In the configure software phase, launch the main shortcut and enter the registration details if you already have. Once the application opens, close it. Do this for at least 2 - 3 times. Launch again and keep the shortcut open and run the following command in CMD Prompt.




 reg add "HKCU\Software\Nico Mak Computing\WinZip\WinZip" /v AssocMsgExe /t REG_SZ /d 0 /f

Close WinZip app and open it again for the last time.

NOTE:

This step is done in order to suppress the below popup window from occurring in the client side after publishing and launching the shortcut.





8. In the Installation Report, You can notice that App-V has detected DCOM object. As all know DCOM is not supported by App-V 5.1 too. Just click on close and skip to next.

NOTE - I have done basic functionality tests alone and it seems to work fine without any issues. If anyone come across any issues because of this kindly report me back.




9. In the streaming phase, execute the shortcut if you want to capture feature blocks. If not click next to fault stream.




10. At the "Create Package" stage select "Continue to modify package without saving the package editor"



11. Check in the "Virtual Registry" tab whether the registry is captured properly.

REG_SZ AssocMsgExe with value 0 is under USER\[{AppVCurrentUserSID}]\Software\Nico Mak Computing\WinZip\WinZip.




If it is present, click File and save the package.

NOTE:

Adding AssocMsgExe to the Virtual Registry inside the Package Editor after the monitoring phase or configuring phase will not suppress the prompt. It needs to be done only during the monitoring phase or configuring phase.

Sunday, April 3, 2016

Finally I am a Microsoft MVP (Most Valued Professional)


April 2016 started very well with a good news for me. Earlier today I was checking my mails and I was totally taken aback. I received a mail from Microsoft stating that I have been awarded the most prestigious MVP award for outstanding contributions to the Microsoft community and other forums in terms of App-V. I was super excited to see a recognition from Mr. Biplab Paul, PMP Audience Evangelism Manager – India Communities Microsoft.This was like a dream come true for me.


Getting the MVP award was one of my long term goal and finally I have achieved it. This is my very first MVP award.I am so honored to be a part of the Microsoft Community and now also the MVP program! I would like to thank all other App-V gurus, App-V MVP's, Microsoft MVP program, India MVP program and my beloved family & friends.I would like to dedicate this to Rory Monaghan who inspired me to achieve my goal.And finally a big thanks to all of you who supported me and visited my blog, without you this wasn’t even possible!


A Big Thanks to all once again.

/Vigneshwaran