First of all, try to execute your application under elevated privileges and see if there is any difference:
http://www.sevenforums.com/tutorials/11841-run-administrator.html[
^].
If the problem is the permission, you can do some file system administration to give the user appropriate permissions to the files in question. Or you can embed the manifest requesting the elevation of privileges from the very beginning. This might be the bad solution not addressing the root of the problem.
It's possible that you are using wrong directories with your application, not legitimate ones. It does not mean that you did something legitimate for XP and not legitimate for Windows 7 and 8. It means that your application was wrong in first place, but XP was too forgiving. If someone tightened the permission in XP, your solution would not work. It did not really guaranteed to work on all systems. It often happens when you use some hard-coded path names in your code. There are no situations when this could be useful. You should either put responsibility for file location on the user (take from user input or some configuration files) or use proper directories associated with the user accounts or reserved for "all users". In all cases, you calculate the locations (paths) during runtime, never hard-code them.
[EDIT]
Please read about "special folders":
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762204%28v=vs.85%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx[
^].
You should not assume the user can use any arbitrary directories, but the paths returned by the function shown above will point you to the legitimate directories you can always use. Some are set to be read-write to the currently logged on user, some are read-only, but they are supposed to be always accessible.
—SA