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


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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.