Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Make a copy of a CDocument Pin
Darryl Bryk22-Dec-09 12:01
Darryl Bryk22-Dec-09 12:01 
GeneralRe: Make a copy of a CDocument Pin
Richard MacCutchan23-Dec-09 0:03
mveRichard MacCutchan23-Dec-09 0:03 
AnswerRe: Make a copy of a CDocument Pin
Nelek20-Dec-09 21:39
protectorNelek20-Dec-09 21:39 
GeneralRe: Make a copy of a CDocument Pin
Darryl Bryk22-Dec-09 11:58
Darryl Bryk22-Dec-09 11:58 
GeneralRe: Make a copy of a CDocument Pin
Nelek22-Dec-09 20:56
protectorNelek22-Dec-09 20:56 
GeneralRe: Make a copy of a CDocument Pin
Darryl Bryk23-Dec-09 5:55
Darryl Bryk23-Dec-09 5:55 
GeneralRe: Make a copy of a CDocument Pin
Nelek23-Dec-09 9:39
protectorNelek23-Dec-09 9:39 
QuestionHow to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
sashoalm18-Dec-09 5:08
sashoalm18-Dec-09 5:08 
I have a service running with the local system ("NT AUTHORITY\SYSTEM") credentials, and I have the name of the user (LPCTSTR). Now I need to start a process with that user's credentials, but I don't know that user's password ("NT AUTHORITY\SYSTEM" shouldn't need any passwords, right?). How can I do that? My biggest problem is getting the token.

LPCTSTR strUserName = "username";

HANDLE hToken = ???
              use LogonUser
              or DuplicateHandleEx
              or ImpersonateLoggedOnUser

CreateProcessAsUser(hToken, ... );


There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal

AnswerRe: How to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
«_Superman_»18-Dec-09 7:15
professional«_Superman_»18-Dec-09 7:15 
GeneralRe: How to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
sashoalm18-Dec-09 7:35
sashoalm18-Dec-09 7:35 
GeneralRe: How to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
«_Superman_»18-Dec-09 7:39
professional«_Superman_»18-Dec-09 7:39 
QuestionI m a starter Pin
code_breaker18-Dec-09 4:44
code_breaker18-Dec-09 4:44 
AnswerRe: I m a starter Pin
«_Superman_»18-Dec-09 4:53
professional«_Superman_»18-Dec-09 4:53 
AnswerRe: I m a starter Pin
Rajesh R Subramanian18-Dec-09 4:54
professionalRajesh R Subramanian18-Dec-09 4:54 
GeneralRe: I m a starter Pin
code_breaker18-Dec-09 5:56
code_breaker18-Dec-09 5:56 
GeneralRe: I m a starter Pin
Tim Craig18-Dec-09 12:56
Tim Craig18-Dec-09 12:56 
GeneralRe: I m a starter Pin
Rajesh R Subramanian18-Dec-09 17:09
professionalRajesh R Subramanian18-Dec-09 17:09 
GeneralRe: I m a starter Pin
Tim Craig18-Dec-09 18:42
Tim Craig18-Dec-09 18:42 
AnswerRe: I m a starter Pin
CPallini19-Dec-09 0:13
mveCPallini19-Dec-09 0:13 
AnswerRe: I m a starter Pin
Alan Balkany23-Dec-09 4:27
Alan Balkany23-Dec-09 4:27 
QuestionDefrag Registry Pin
Adnan56218-Dec-09 4:38
Adnan56218-Dec-09 4:38 
AnswerRe: Defrag Registry Pin
Richard MacCutchan18-Dec-09 9:18
mveRichard MacCutchan18-Dec-09 9:18 
GeneralRe: Defrag Registry Pin
Adnan56218-Dec-09 9:36
Adnan56218-Dec-09 9:36 
GeneralRe: Defrag Registry Pin
Richard MacCutchan18-Dec-09 9:52
mveRichard MacCutchan18-Dec-09 9:52 
GeneralRe: Defrag Registry Pin
Adnan56218-Dec-09 13:04
Adnan56218-Dec-09 13:04 

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.