Hello!

I've built an application, created a setup for it, packed, etc.
I've installed it on XP, and it works perfectly well.
But the application actually produces images and other files, so when I tried it on Vista, I continually got the UnauthorizedAccess Expection. I understand that this is advanced security and etc, but how can I solve it? The application is installed in Program Files, where applications used to be installed, so there must be a way to overcome this problem.
E.g. can I (or the user) grant rights for the app during installation or somehow?

Thanks in advance!

Your user should be administrator to run such type of applications, you don't have to do anything from your side.

Thanks for your answer, but I run the application, and I'm an administrator for my machine. I even set the rights of the folder Program Files to enable modifying, deleting, etc for any user, (what nobody will do for running my app on their computer).

Have you got any other suggestions?

Is UAC on or off?

The directories XP is used to like /Documents and settings and My Documents dont exist on vista. If UAC is on, it should redirect calls to /Documents and Settings to the new /Users.

If this doesnt work, ensure your program uses %userprofile% or something instead of hardcoding the paths.

Thank you for your answer.

The paths aren't hard coded, in fact, the path used by the program to create files is the Application.StartupPath (in this case: C:\Program Files\Manufacturer\Product Name\)

I can make it work by enabling single users to modify the contents of the mentioned folder (by default, they are just able to read contents). But I don't expect this from the end users. so I still need a sollution.
Should I deploy it elsewhere? Or create a folder in the C:\Users\X\Documents\ and place there the output?

This article has been dead for over six months. Start a new discussion instead.