C++ builder application start with administrator rights

Hello,

sorry if this topic were discussed before, I swear I tried to find it everywhere but I failed...

I would need to know how to make the c++ builder application to be started with administrator rights (it's common behaviour for installers - when it is started, it asks for administrator rights).

Could you please help me with e.g. some link to appropriate tutorial/article etc... thanks a lot!

Lida
First give a little bit more info.
1. What is the name of the program called? I need to be able find some documentation.
2. What is your operating system? On windows Vista and up its pretty easy.
3. Are you an administrator or super user on your computer?
After you answer at the first two I should be able to help.
http://code.msdn.microsoft.com/windowsdesktop/CppUACSelfElevation-5bfc52dd
That article should help you out. Assuming you're on windows.
Hello,

thank you very much for your answer.

I have Borland C++ Builder 6 and I am trying to create an installer. It's goal is to copy some files to selected directory and then run prepared .bat file - the builder form is only nice "jacket". BUT it works ok only when I run the .exe (generated by borland builder) as administrator (right click - open as administrator). Otherwise the .bat file doesn't have appropriate rights and even if it calls the windows dialog, it usually exits with an error. So, what I need is, to force the user, who will be opening this exe file, to run it as administrator (I have seen this behaviour before when installing apps, so I thought it's quite common).

To Thumper - thank you very much for the link, I will get through this and see whether I can make it work for my app as well.
You could turn off UAC controls. This would make it so that all applications run by you would run as administrator.
Topic archived. No new replies allowed.