vbphil
Sat Mar 31 09:10:03 CDT 2007
Thanks for your suggestions.
I tried CPAU but I guess my situation is more complex than I eluded and I
couldn't get it to work. The rest of the details are. My script that will
envoke running an application as another user will be executed by the local
SYSTEM account. The user I need to impersonate is a Windows AD domain user
account and this is all running in 32Bit mode on a Win64 3K server.
So, for now, I guess using the Windows Task Scheduler is the way to go. My
script, running as the local SYSTEM account, can configure the Task Scheduler
to run another application as a domain AD user. I can supply the password in
the Task setup as well. This is presently working.
I was hoping RunAs.exe might do it but it doesn't accept a password
parameter. Oh Well.
"Stace" wrote:
>
> "vbphil" <vbphil@online.nospam> wrote in message
> news:181D6B5A-376E-441E-8BBE-3A66EEE4540C@microsoft.com...
> > From inside my batch file I need to run an application as a different
> > user,
> > similar to the Run As command from the desktop. I'm currently using a DOS
> > Batch file but could use a vbscript batch as well.
> >
> > Is there a way to exexcute a file from a batch file as a different user?
> >
> > My current solution is using a Scheduled Task that is configured to run as
> > a
> > different user and then I run that Task from the batch file.
> > schtasks /run /tn wbp04324_filecopy
> >
> > I'd like to avoid using the Scheduled Task if I can call it directly.
> >
> > Thanks, -phil
> >
>
> Take a look as CPAU:
>
http://www.joeware.net/freetools/tools/cpau/index.htm
>
> Should do what you want and can encode the job file so that prying eyes
> cannot determine the credentials used to run it.
>
> HTH
> Stace.
> >
> > --
> > no place like 127.0.0.1
>
>
>