![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Dear all, I am buidling as assembly which logs potentials generated error or exception in Event viewer. For that I am through code creating an EventSource for the log before writing inside. I have noticed that for creating that source you need to be an administrator user. So if my libryr is executed my a client aplication under a normal user context, I will have an exception error when creating the EventSource. How can I be an administrator from my code only during the needed time ? Sure I might change the contect of my code to be an admin and then impersonate during the execution of my admin part, then probably use the Undo method to recover to normal user but how ? |
|
My assembly would need also the EvenLog permission i guess ? |
|
As declarative of imperative mode. |
|
thnaks for help regards serge |
#3
| ||||
| ||||
|
|
Dear all, I am buidling as assembly which logs potentials generated error or exception in Event viewer. For that I am through code creating an EventSource for the log before writing inside. I have noticed that for creating that source you need to be an administrator user. So if my libryr is executed my a client aplication under a normal user context, I will have an exception error when creating the EventSource. How can I be an administrator from my code only during the needed time ? Sure I might change the contect of my code to be an admin and then impersonate during the execution of my admin part, then probably use the Undo method to recover to normal user but how ? |
|
My assembly would need also the EvenLog permission i guess ? |
|
As declarative of imperative mode. |
|
thnaks for help regards serge |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |