When this occurs you see the message “An Unexpected Error occurred. Contact Citrix Technical support”. This following entry appears in the StoreFront log files (described in https://docs.citrix.com/en-us/storefront/current-release/troubleshoot.html ):
System.InvalidOperationException: The installation failed, and the rollback has been performed. ---> System.ComponentModel.Win32Exception: Unknown error (0xc0000142) at System.Diagnostics.PerformanceCounterLib.RegisterFiles(String arg0, Boolean unregister)
To fix the corruption, and allow StoreFront to be installed correctly, rebuild the Performance Counters counters using the following steps on the virtual machine that was exhibiting the problem:
1. Restore the affected virtual machine from a Snapshot or template.cd c:\windows\system32 lodctr /R cd c:\windows\sysWOW64 lodctr /R WINMGMT.EXE /RESYNCPERF3. Stop and restart the Performance Logs and Alerts service.