Re: Can't copy/rename file using CreateProcessWithLogonW, ImpersonateLoggedOnUser and LogonUser

Tech-Archive recommends: Speed Up your PC by fixing your registry



"Ray Greene" <raygr@xxxxxxxx> wrote in message
news:p112a1lhf04n2kub1inbos8k9e0mtma7n2@xxxxxxxxxx
> On Fri, 3 Jun 2005 10:16:48 -0700, "Sam Hobbs"
> <samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>>If the programs you have written are executed without Administrator
>>priviliges then it makes sense that they can't get Administrator
>>priviliges.
>>Use of CreateProcessWithLogonW to grant higher privileges should not work
>>either. If any of that did work, it would be a huge violation of the
>>purpose
>>of security.
>>
>>If I understand what it is that you are trying to do, then it does not
>>work
>>because Windows security is designed explicitly to not allow it.
>
> But isn't this how Runas works?
>
> --
> Ray Greene.

When I run Runas, I must enter the password for my Administrator account.
You can probably get Administrator privileges for your program by using
CreateProcessWithLogonW but you will need to know the password and store the
password in the program. If you are not careful, others can find the
password in your program.


.



Relevant Pages