Reputation: 36896
When my app is running elevated and creates a file (using CreateFile
), that file requires elevation to be further edited.
How do I create a file that does not require elevation to edit, even if my app is running elevated?
Upvotes: 1
Views: 178
Reputation: 612784
When my app is running elevated and creates a file (using CreateFile), that file requires elevation to be further edited.
That is not correct. What is actually happening, most likely, is that you are saving the file to a directory which has restrictive access rights. For example, the program files directory, or the system directory.
So, there are two ways for your program, when running elevated, to save a file which can be edited by standard user:
Of these options, the former is usually the correct choice.
Upvotes: 3