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

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



Re: VBScript That Changes Its Identity by Anthony

Anthony
Wed Jul 09 15:36:51 CDT 2008



"Al Dunbar" <AlanDrub@hotmail.com.nospaam> wrote in message
news:erFGgwY4IHA.784@TK2MSFTNGP04.phx.gbl...
>
> "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.
>

Another alternative is to install scripted components into a COM+
application and set that applications identity to the user credentials you
want to use.

--
Anthony Jones - MVP ASP/ASP.NET



Re: VBScript That Changes Its Identity by Joseph

Joseph
Thu Jul 17 12:20:16 CDT 2008

"Al Dunbar" <AlanDrub@hotmail.com.nospaam> wrote in message
news:erFGgwY4IHA.784@TK2MSFTNGP04.phx.gbl...
> At best, a script (vbscript, batch, etc) can use runas to start a new
> process under alternate credentials . . .

That's probably what I need to do. I'll experiment with runas.

Thanks, Joseph



Re: VBScript That Changes Its Identity by Joseph

Joseph
Thu Jul 17 12:21:39 CDT 2008

"Anthony Jones" <Ant@yadayadayada.com> wrote in message
news:OsF2FOg4IHA.4988@TK2MSFTNGP04.phx.gbl...
> Another alternative is to install scripted components into a COM+
> application and set that applications identity to the user credentials you
> want to use.

That sounds tricky. I'll keep it in mind as an alternate approach.

Thanks, Joseph