Issue with Infopath forms in SharePoint 2013

Issue with Infopath forms in SharePoint 2013

Recently we started facing an issue with opening Infopath forms in SharePoint 2013. When you click on customized form in any list, it opens infopath and gives below error
 
This error is because of the office updates which is modifying some registry keys which are required for MS Infopath to open.
 
As a workaround, you can run below command on the machine where you are trying to open Infopath form. These commands will modify the registry values as they should be.
 
Open powershell and run below commands with elevated privileges
  1. New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR  
  2. $Value = 'C:\PROGRA~1\MIF5BA~1\Office15\PROTOC~1.EXE "%1"'  
  3. Set-ItemProperty "HKCR:\ms-infopath\shell\open\command" -Name "(Default)" -value $Value