1

I have the program that show the registration window when it was started. When I set login and password the program must create some file in Program File/SomeProgram directory. I need administrator rights for this program.

How can I run program with administrator rights if program isn't registered? So I need set administrator rights when I create file. I need some example code.

Mat
  • 202,337
  • 40
  • 393
  • 406
Oleksandr Fentsyk
  • 5,256
  • 5
  • 34
  • 41

1 Answers1

3

You might consider writing to CommonAppData special folder, instead of Program Files.

Greg
  • 1,660
  • 13
  • 12