Key press Enter in batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ngusaomanoi
Posts: 8
Joined: 13 Nov 2012 20:27

Key press Enter in batch file

#1 Post by ngusaomanoi » 20 Jun 2014 21:42

Hi all,
i'm writting a batch file to create user and grant privileges in mysql.
But i don't know how to create key event ( line red ).

cd C:\Program Files\MySQL\MySQL Server 5.6\bin
c:
mysql -u root -p
(Press Key ENTER)
create user "db_user";
grant all on db_temp.* to 'db_user'@'127.0.0.1' identified by 'db_password';

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Key press Enter in batch file

#2 Post by foxidrive » 21 Jun 2014 07:34

Is the red event a simple pause, or is the enter key supposed to be within the MySQL interface?

ngusaomanoi
Posts: 8
Joined: 13 Nov 2012 20:27

Re: Key press Enter in batch file

#3 Post by ngusaomanoi » 24 Jun 2014 21:24

foxidrive wrote:Is the red event a simple pause, or is the enter key supposed to be within the MySQL interface?


Is the enter key supposed to be within the MySQL interface.
Can you suggest me ?
Thanks you

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Key press Enter in batch file

#4 Post by foxidrive » 25 Jun 2014 03:17

You can use SENDKEYS with a VBS script or AutoIt can press keys too.

Post Reply