When I was installing SharePoint 2010 i encounter an error from the title.
Log in EventLog was:

The server encountered an unexpected error and stopped.
“ERR: MMS(4828): libutils.cpp(10475): RegQueryValueEx of Server failed with 2
BAIL: MMS(4828): libutils.cpp(10477): 0×80070002 (The system cannot find the file specified.)
ERR: MMS(4828): libutils.cpp(10475): RegQueryValueEx of SQLInstance failed with 2
BAIL: MMS(4828): libutils.cpp(10477): 0×80070002 (The system cannot find the file specified.)
ERR: MMS(4828): libutils.cpp(10475): RegQueryValueEx of DBName failed with 2
BAIL: MMS(4828): libutils.cpp(10477): 0×80070002 (The system cannot find the file specified.)
BAIL: MMS(4828): server.cpp(281): 0×80070002 (The system cannot find the file specified.)
BAIL: MMS(4828): server.cpp(3518): 0×80070002 (The system cannot find the file specified.)
BAIL: MMS(4828): service.cpp(1528): 0×80070002 (The system cannot find the file specified.)

I spend hours trying to figure out what file missing. Well, solutions was quite different.

I added service account (account for window services Forefront Identity Manager Service  and Forefront Identity Manger Synchronization Service) into three groups on local machine:
 
 FIMSyncOperator, FIMSyncJoiners and FIMSyncBrowse  and errors gone.

Strange was also that when I installed SharePoint 2010, service account was /.
I change this to domain user account and that user added into three groups mention previously.

I hope that this will help someone and save time.