Open the windows file explorer by going to the windows start menu > then clicking on "Computer"
You will need to show hidden files and folders. See the Hidden Files and Folders FAQ.
If you click to the right of the breadcrumbs > and type in %appdata% and press enter it will take you to the appdata/roaming folder.

Once there you should see a folder called HoldemManager (See No1 below), right click it and choose properties. Then untick "read only" (see No2 Below) and choose apply to all files and subfolders, this may take a while depending on the size of your database. It will still show Read Only, this is a Windows issue. Once completed click on the security tab (See No 3 below) and we will adjust the security settings also.

First select edit (See No 1 Below) and then select the user your logged under windows as (See No 2 below), there might be several if you have more than 1 user on your PC, if unsure you can just repeat this process for all the users and admininistrators.

Finally make sure all the tick boxes for allow as ticked for that user and select apply and ok.
This process of unticking read only and setting security settings in the previous steps needs to be repeated for the C:/Program Files(x86)/HoldemManager2 folder, the C:/HM2archive or whatever other archive folders you have specified, the Postgres installation folder and also any hand history folders you have. Please go to Site Setup in the ribbon of HM2, then go to Auto Import Folders for each site you play to see a list of your auto import folders like below. Its a one time process but important that you set all the correct permissions if you are having issues with exceptions, crashes or strange import issues with HM2.
You may need to add the Postgres user. You will do so by clicking Add in the above image. Now, in the popup window (see below), type postgres in the box, then click check names. In Postgres 9.2, they changed the user to Network. Use Network as the User in all steps if you are using 9.2 or newer.
Follow the same steps, adding "Everyone" in the check names box.


Additional steps:
After the folders and files have correct permissions settings, you should:
1. Turn off UAC in Windows Vista or 7and 8
2. Set poker related Files to Run As Administrator
3. Update Windows fully
4. Set up your Firewall Exceptions.