How Do I deploy applications so that they require administrator rights without the end-user doing that by hand?
I use Delphi 2009 to build the application.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can inform Windows that your application needs to run as an administrator by using the
requestedExecutionLevelelement in your application manifest.The manifest file is an XML file that looks as follows. It should be named YourApp.exe.manifest and placed in the same folder as the executable. (It can also be embedded in the resources of your application; it must have a resource type of
RT_MANIFESTand an ID of 1.)For further details on application manifests and how to create them, see Create and Embed an Application Manifest (UAC) at MSDN.
Note that the manifest is only respected by Windows Vista and later. If your user is running as a standard user on Windows XP, your application will not be launched as an administrator; you may need to write code to detect this if it will be a problem for your application.