Click here to Skip to main content
15,921,837 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# CODE SNIPET FOR RUN AS ADMINISTRATOR Pin
Mirko198014-Jan-10 3:14
Mirko198014-Jan-10 3:14 
AnswerRe: C# CODE SNIPET FOR RUN AS ADMINISTRATOR Pin
dan!sh 14-Jan-10 3:14
professional dan!sh 14-Jan-10 3:14 
Omoniyi Ogunderu wrote:
C# application to automatically RUN AS ADMINISTRATOR


Not sure how you can do that. You would need to elevate the rights of the user under which your application runs and then again remove that once the run is over.

Although, you can show that UserAccount control dialog (the one with cancel and allow options). You can achieve this by using a manifest file. Add the following entry into your manifest file and it should work:

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


50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

AnswerRe: C# CODE SNIPET FOR RUN AS ADMINISTRATOR Pin
Not Active14-Jan-10 4:50
mentorNot Active14-Jan-10 4:50 
AnswerRe: C# CODE SNIPET FOR RUN AS ADMINISTRATOR Pin
#realJSOP14-Jan-10 10:14
professional#realJSOP14-Jan-10 10:14 
AnswerRe: C# CODE SNIPET FOR RUN AS ADMINISTRATOR Pin
OriginalGriff14-Jan-10 10:37
mveOriginalGriff14-Jan-10 10:37 
AnswerRe: C# CODE SNIPET FOR RUN AS ADMINISTRATOR Pin
OriginalGriff14-Jan-10 10:39
mveOriginalGriff14-Jan-10 10:39 
QuestionInterrogating objects passed from COM Pin
DwR13-Jan-10 23:12
DwR13-Jan-10 23:12 
AnswerRe: Interrogating objects passed from COM Pin
Ilia Blank14-Jan-10 3:57
Ilia Blank14-Jan-10 3:57 
Questionhorizontal Panel scrolling - unexpected behaviour Pin
lukeer13-Jan-10 22:29
lukeer13-Jan-10 22:29 
AnswerRe: horizontal Panel scrolling - unexpected behaviour Pin
Covean13-Jan-10 23:07
Covean13-Jan-10 23:07 
GeneralRe: horizontal Panel scrolling - unexpected behaviour Pin
lukeer14-Jan-10 0:03
lukeer14-Jan-10 0:03 
GeneralRe: horizontal Panel scrolling - unexpected behaviour Pin
Covean14-Jan-10 1:22
Covean14-Jan-10 1:22 
GeneralRe: horizontal Panel scrolling - unexpected behaviour Pin
lukeer14-Jan-10 2:45
lukeer14-Jan-10 2:45 
GeneralRe: horizontal Panel scrolling - unexpected behaviour Pin
Covean14-Jan-10 3:36
Covean14-Jan-10 3:36 
AnswerRe: horizontal Panel scrolling - unexpected behaviour Pin
lukeer13-Jan-10 23:57
lukeer13-Jan-10 23:57 
GeneralRe: horizontal Panel scrolling - unexpected behaviour Pin
lukeer14-Jan-10 3:13
lukeer14-Jan-10 3:13 
QuestionApplication and Window's context menu Pin
Islorvat13-Jan-10 21:11
Islorvat13-Jan-10 21:11 
AnswerRe: Application and Window's context menu Pin
Eddy Vluggen13-Jan-10 22:47
professionalEddy Vluggen13-Jan-10 22:47 
QuestionSuppress Date on MS Report Pin
kruegersck13-Jan-10 18:45
kruegersck13-Jan-10 18:45 
AnswerRe: Suppress Date on MS Report Pin
loyal ginger14-Jan-10 5:20
loyal ginger14-Jan-10 5:20 
QuestionCancel CellValidating error in DataGridView, so can close form while invalid entry still present Pin
Nigel Mackay13-Jan-10 18:31
Nigel Mackay13-Jan-10 18:31 
AnswerRe: Cancel CellValidating error in DataGridView, so can close form while invalid entry still present Pin
6,921,364 and growing24-Apr-11 20:19
6,921,364 and growing24-Apr-11 20:19 
GeneralRe: Cancel CellValidating error in DataGridView, so can close form while invalid entry still present Pin
Nigel Mackay24-Apr-11 20:41
Nigel Mackay24-Apr-11 20:41 
GeneralRe: Cancel CellValidating error in DataGridView, so can close form while invalid entry still present Pin
6,921,364 and growing27-Apr-11 3:43
6,921,364 and growing27-Apr-11 3:43 
QuestionOperation is not supported for this type of object Pin
Abdul Rahman Hamidy13-Jan-10 18:09
Abdul Rahman Hamidy13-Jan-10 18:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.