I have an .exe that I want people to be able to download and run on Vista. It needs to run as admin. I have a web page with a 'Download' button. Assume I am logged in as an admin. I click the 'Download' button and IE8 asks whether to Run or Save. I choose 'Run'. The program is downloaded and started by IE 8. But it does not start as admin or ask the user if it's OK to run as admin. What do I need to do to make it ask?

I'm not looking for a workaround for a clever user. I do not want the user to have to do anything unusual such as save the file and then right click "run as admin", or make a shortcut and edit its properties, or turn off UAC, or run IE as admin, or do anything else other than be logged in as an admin and confirm that it's OK for the .exe to run as admin.

Thank you.

Recommended Answers

All 2 Replies

What language did you use to write that program? In C and C++ there are a few win32 api function calls you need to make in order to make the program run with admin privileges. See this article and the links at the bottom.

What language did you use to write that program? In C and C++ there are a few win32 api function calls you need to make in order to make the program run with admin privileges. See this article and the links at the bottom.

Thank you, Anceint Dragon. That's a useful link. Looking at it and the specific privileges in its link led me to look at exactly why my program needed to run as admin. I was then able to change the code to remove the need for admin privileges.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.