I have a database file .mdf from MS SQL EXPRESS in folder:
.mdf
C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\DATA
Start->Run->services.msc->scroll through the list of services until you find SQL Server->right-click->properties->Log On tab:
services.msc
Then choose Local System Account and check the Allow service to interact with desktop checkbox.
Local System Account
Allow service to interact with desktop
Restart the service.