Well I noticed that on Windows 7, sometimes even when you are an administrator, you can't do a lot of things, probably it's some sort of bug, my application I check if an user is administrator before start the program because my program creates file in folders that are protected default like the root folder ( C: ), and if you aren't an administrator on Windows 7, you can only create folders there.
So if I right click in my application and go "Run as Administrator", it just works fine.
Is there a way to make my application run as administrator automatically? I would like to be able to make a line of code like: ActivateAdministrator();
and be available for the code completely, because I change attributes, create files with ifstream
.