how to automate console input.

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
rfadnavis002
Posts: 2
Last visit: Thu Apr 01, 2021 11:03 pm

how to automate console input.

Post by rfadnavis002 »

Hello,

Below is my command to perform one activity. It accepts few arguments which is fine and no issues there. But when we run that command in cmd, it asks for password and confirm password.
I want to automate that password and confirm password part. How can I do that?

Example:

When we run below command in cmd -

c:\Test\myscript.exe --arg1 --arg2 --config "c:\Temp\config.cfg" --confirm

It shows below in same command prompt-

Performing the script execution for ABCD.

Enter password:

Type again to confirm:


What I need is, How can I automate this enetering of password and confirm password, considering I have the password.
Please help here. Powershell or vbscript is preferred solution.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: how to automate console input.

Post by jvierra »

Please do not post the same question in multiple forums.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked