views:

334

answers:

1

Hi, I've written a code in winforms and added this code to a setup application. (That code is actually to create files in application directory)

When I try to run the application in vista it is not working because the file creation permission. If I manually enable the permissions to application folder it is working fine.

How can I assign permissions to my applications folder using c#?

Thank you, Nagesh

A: 

Maybe you would like to check whether you are running as administrator or not in the first place? Or check whether you have your UAC account turn on.

Also note that there is no way to create a file if you are running under guest mode.

Ngu Soon Hui