When restoring a QuickBooks company file backup using the "Restore QuickBooks Data" you may get the error:
System.UnauthorizedAccessException: Access to the path 'C:\Users\~ .QBW.DSN' is denied.
There are multiple causes for this, but they all relate to access rights, either because someone else has the file in use, or you do not have right to access it.
1. From within QuickBooks, choosing File > Exit
2. Open the Task Manager (CTRL+ALT+DEL) and select Processes. Check for QBW32.exe, if it is running select it and click End process.
3. In a rare case a reboot may be necessary. If you continue to have issues restoring your Quickbooks backups please contact support.