Error 1719.The Windows Installer Service could not be accessed

Microsoft .Net Framework 4.5.2/4.6/4.6.1 fails to install on Windows 7/2008 R2 OSs. The installation may roll back at the end.

As per the log, this is a custom action failure:

SI (s) (68:58) [13:28:19:005]: Executing op: CustomActionSchedule(Action=CA_Regtlb_Microsoft.JScrip_amd64,ActionType=3073,Source=BinaryData,Target=QuietExec,CustomActionData="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regtlibv12.exe" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.JScript.tlb";11)
MSI (s) (68:58) [13:28:19:005]: Creating MSIHANDLE (19) of type 790536 for thread 4696
MSI (s) (68:48) [13:28:19:005]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI4EFE.tmp, Entrypoint: QuietExec
MSI (s) (68:78) [13:28:19:005]: Generating random cookie.
MSI (s) (68:78) [13:28:19:021]: Created Custom Action Server with PID 1340 (0x53C).
MSI (s) (68:64) [13:28:19:083]: Running as a service.
MSI (s) (68:64) [13:28:19:099]: Custom Action Server rejected - Wrong Context
MSI (s) (68:78) [13:28:19:099]: CA Server Process has terminated.
CustomAction CA_Regtlb_Microsoft.JScrip_amd64 returned actual error code 1601 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (68:48) [13:28:19:099]: Closing MSIHANDLE (19) of type 790536 for thread 4696
MSI (s) (68:58) [13:28:19:099]: Note: 1: 1719 2: CA_Regtlb_Microsoft.JScrip_amd64 3: QuietExec 4: C:\Windows\Installer\MSI4EFE.tmp
MSI (c) (E0:3C) [13:28:19:099]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Error 1719.The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.

In order to resolve the above issue, please follow the below steps:

• Under Key “HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer”, create a DWORD: “SecureRepairPolicy” and set its Value to 2.
• Add the list of Applications to Whitelist: Create a new keySecureRepairWhitelist” under “HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer” and create StringValues with the MSI package product codes (Including flower brackets {})
The product code of .Net Framework 4.6.1 is {BD6F5371-DAC1-30F0-9DDE-CAC6791E28C3}

For example:

1

2

You can open your msi file with Orca and check the property table for "Product Code". For more information on usage of Orca tool: https://support.microsoft.com/en-in/kb/255905

Ref: https://support.microsoft.com/en-us/kb/2918614
https://blogs.msdn.microsoft.com/astebner/2011/05/16/possible-cause-of-error-code-1719-or-1723-when-installing-a-64-bit-msi/
https://blogs.msdn.microsoft.com/rflaming/2005/07/12/troubleshooting-signs-of-an-incorrectly-registered-custom-action-server/