user4786688
user4786688

Reputation:

Pipe User-Input String to Command in Windows Batch

I'm trying to automate a simple task.

This task requires that I login into an application. And this application requires I enter a password!

A simple attempt to login on command line would be like:

vv -u myuser login
Enter password: 

And this waits for my input.

How can I pass my password to it?

I tried the following

echo "mypassword" | vv -u myuser login

echo "mypassword" | -S vv -u myuser login

Neither worked! It's actually returning "Invalid password" but if I type the password manually it works.

Upvotes: 1

Views: 4018

Answers (1)

Antoni Gual Via
Antoni Gual Via

Reputation: 763

Try

echo(mypassword| vv -u myuser login

no spaces or quotes around the password

Upvotes: 3

Related Questions