On Windows 7, running application under administrator account is not enough. Additionally, you need to launch application "As Administrator". Yes, this is a total terminological absurd, but 1) this is really how things work, 2) this conception and feature is actually very good. I would prefer to call it "privilege elevation". This is related to what is called "UAC":
http://en.wikipedia.org/wiki/User_Account_Control[
^].
Now, let me clarify what I mean by running "As Administrator", or elevation. This:
http://www.sevenforums.com/tutorials/11841-run-administrator.html[
^].
Apparently, it is impossible to programmatically elevate privileges, no matter what you do, because otherwise it would mean that UAC is impossible. One thing you can do is to force elevation from the very beginning, which would show a UAC confirmation dialog without clicking on "Run As Administrator". This is done by adding and properly configuring application
manifest. This is how:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[
^].
—SA