> file. As soon as you enter the params, the next line asks for a
> password, any idea how to automate this?
>
> ie "Press Enter" and the execute a copy.
You know, I didn't even think of that when I suggested this. In the few
cases where I've wanted to impersonate another user from a program, I could
do that directly with the appropriate Windows API functionality. You used to
be able to do it from CF 4 and CF 5 using the CFIMPERSONATE command.
Unfortunately, you can't embed the password within the runas command itself.
I suspect that this omission is intentional for security reasons.
There are several runas alternatives, although none appear to be free:
http://www.mast-computer.com/c_9-l_en.html
You can also use SendKeys from Windows Script to take care of this - here's
an already-written example of code for this:
http://www.tek-tips.com/gfaqs.cfm/lev2/4/lev3/32/pid/329/fid/2760
Your best bet, though, is probably to use sanur, which is a pipe utility for
this very purpose:
http://www.commandline.co.uk/sanur/index.html
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

