Prev: GetDetailsOf
Next: ERROR_ACCESS_DENIED5 (00000005)
From: Bhaskara Raju BSV on 23 Feb 2005 07:37 How can I execute this code to grab immediate administrator privilages for the domain user account without log-off the current session. Can we have any such chance to optain quick admin rights for the current domain user without log-off the system. Waiting for the adequate solution to this problem & It will be more appreciable.. Thank You Bhaskara Raju [ vu3rjy ] vu3rjy(a)hotmail.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
From: Al Dunbar [MS-MVP] on 24 Feb 2005 00:37
"Bhaskara Raju BSV" <vizagmails(a)rediffmail.com> wrote in message news:O0Pb$RaGFHA.392(a)TK2MSFTNGP14.phx.gbl... > How can I execute this code to grab immediate administrator privilages > for the domain user account without log-off the current session. Can we > have any such chance to optain quick admin rights for the current domain > user without log-off the system. Waiting for the adequate solution to > this problem & It will be more appreciable.. The best solution depends on the context of how you are going to run the script. If you are going to run it interactively while logged on with an account not having admin rights, you could use runas.exe, but you would need to supply the name and password of an account having the required rights. If you want it to run automatically in the logon script, for ANY user who might log in (but who, for obvious reasons, has no knowledge of admin privs), you would need to use one of the available "runas" utilities that allows you to embed the admin credentials (see RunAsPro, Sanur.exe, and CPAU.exe). You would also need to take steps to make it difficult for someone to use the embedded (and encoded or encrypted) credentials for other purposes. Mind you, in either case the user would still not actually enjoy the privileges of "power user" group membership until the next time he logs on. If you still need to do something in the current session that requires elevated privs, then that could be done with runas or one of the utilities listed above. /Al |