I installed CodeBlocks to C:\Develop\CodeBlocks on my computer, you definitely shouldn't install it into Program Files or other similar system folders or you can get that error.
I have a C:\Develop folder (or you could put it in %userprofile%\CodeBlocks and perhaps put your projects in the same %userprofile%\Projects, this way you know you can write there and they're easily accessible by simply clicking the folder on your desktop that has your name.
If you're uncertain where %userprofile% is, just open up a command prompt, it always starts in there by default (provided you're not starting the command prompt with administration rights).
Have you tried running the program as Administrator? This may also help, although I like to avoid doing that if possible.