Re: VBScript That Changes Its Identity by Al
Al
Wed Jul 09 01:22:09 CDT 2008
"Joseph Morales" <JosephMorales@discussions.microsoft.com> wrote in message
news:00C4004D-CF17-4D17-9799-50B200F2F703@microsoft.com...
> Can a VBScript change its identity after it has started, so that it
> switches
> to running under a different username? This is for the purpose of getting
> access to a different set of privileges.
>
> Thanks,
> --
> Joseph
IMHO, it is not possible to change the credentials of an existing process.
At best, a script (vbscript, batch, etc) can use runas to start a new
process under alternate credentials. There are also third party tools that
allow the password to be embedded so you need not enter it manually, as
required by runas. One such is CPAU from Joeware.net. If you use anything
that keeps you from having to enter the password manually, make sure you
consider the possibility that the stored password could somehow be used for
other purposes or stolen.
/Al