i am making a security program which only administrator can run.

now i place one checkbox in registration form that if the user is administrator then he will check that box and program will not ask for " run as administrator"

now i need code for checkbox something like

if checkbox1=true then
program can run without selection run as administrator

else

you are not administrator to run this program

something like this

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

i tried changing "asInvoker" to "highestAvailable" but still not working ... i have 5 forms from which 1 form need administrator privilege which i want to disable and run that form without privilege .. how i can do that

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.