Pass authentication information in a batch file

By alxcsby ·
I've googled this and seen a lot of ways to pass the info through for a logon script, but I have a different sort of question.

I have a program launching batch file using commands of this sort:

start /d "C:\Program Files\Microsoft Office\OFFICE11" WINWORD.EXE

Let's pretend Word would prompt for a username and password after starting. Does anyone have an idea on how to put the username and password in via an argument?
I'm afraid this will only be available if it was designed into program, but I'm sure there are wiser folk than I on here.
Thanks in advance for your help!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

I guess you mean Word 2007?

by jck In reply to Pass authentication infor ...

If so, here's the article from MS:

I don't see a switch you could use for a login script, other than possibly trying something like this:

start /d "C:\Program Files\Microsoft Office\OFFICE11" WINWORD.EXE /f "(filetoload.doc)" | echo $1 | echo $2

Where you'd set $1 parm to a defaulted username value or something you read from a file stream, and $2 as the password from the same type of source, with CRLF appended to both strings.

BTW, that's just a guess as to what might work. I don't have Office 2007 so I can't verify it. Just a raw attempt to give some direction.

Hope that might help. Been years since I scripted anything.

Related Discussions

Related Forums