Re: How to raise rights...



Christian Kaiser wrote:
> oh well, sounds like another "if OSVersion>="... Good idea, but a bit
> late
> from MS. NT4 is still existing.

Then you have a problem. CredUI API only exists on XP while LogonUser is
inaccessible to non-admins on Win2k and NT (IIRC, details in MSDN). You may
need to use the horrible code from here
http://support.microsoft.com/default.aspx?scid=kb;EN-US;180548
as well as supply your own credentials dialog.

> One question: if I'm impersonating an admin, which user is active
> when I
> call CreateProcess()? I guess the "current" user, that is in this
> case the
> admin, and not the original user which called setup. Right?

Depends on what you mean by active. ;-) It is a non-technical term without
definite meaning. What happens is that the current token for the thread that
called ImpersonateXXX becomes the token of administrator. Token is used for
access checks, things like GetUserName etc.

--
Eugene
http://www.gershnik.com


.



Relevant Pages

  • Re: Dynamically modify Web.config
    ... why you need to run impersonating an Admin as this is not a good idea from a ... This posting is provided "AS IS" with no warranties, and confers no rights. ... > I need to set an impersonation with a domain admin account ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: <identity impersonate="true"> question
    ... What is required to make LogonUser work? ... I have an ASP.NET app that needs to create categories in the Event Log. ... my development box, setting impersonate true, and setting the username/pwd ... Impersonating an already authenticated user ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to change user account properties by ASP.NET?
    ... > Hi Evgeny: ... than you are impersonating the client without ... because only local admins would be able to change the ... > admin, ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Re: How to change user account properties by ASP.NET?
    ... > Hi Evgeny: ... than you are impersonating the client without ... because only local admins would be able to change the ... > admin, ...
    (microsoft.public.de.inetserver.iis.asp)
  • Re: How to change user account properties by ASP.NET?
    ... > Hi Evgeny: ... than you are impersonating the client without ... because only local admins would be able to change the ... > admin, ...
    (microsoft.public.dotnet.framework.aspnet.security)