Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

c++ - How can I create and save file in Program File directory in Windows 7?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...