Page 1 of 1
Insert cmd remotely line Bat ?
Posted: 20 Jul 2010 17:12
by Warfighter
how do ?
@echo off
**Execute My file**
Login:"how to insert remotely?"
Password:"how to insert remotely?"
Exit
how to insert and to remotely enter a command without using the keyboard ?
Bye
Re: Insert cmd remotely line Bat ?
Posted: 20 Jul 2010 17:26
by aGerman
If that means, you want to fill in a form (of a website or of another application) then it's impossible using batch.
Batch cannot emulate the keyboard.
Regards
aGerman
Re: Insert cmd remotely line Bat ?
Posted: 20 Jul 2010 19:00
by Warfighter
Want to fill the screen of the batch
when you see Login: on the screen of the commanding bat batch automatically returns the variable that I want
a set style
I entered my starting writing a command line
Login:
wrire test
password:
write pass
exit
is how?
Re: Insert cmd remotely line Bat ?
Posted: 20 Jul 2010 20:14
by aGerman
Hmm, don't know exactly what you want to do.
Code: Select all
@echo off &setlocal
set "login=test"
set "pw=pass"
echo Login:
echo %login%
echo password:
echo %pw%
pause>nul
Another possibility:
You have to type
Login or
password to the command prompt and hit Enter.
Code: Select all
@echo off &setlocal
set "login=test"
set "pw=pass"
set /p "in="
if /i "%in%"=="Login" echo %login%
if /i "%in%"=="password" echo %pw%
pause>nul
Hope that helps
aGerman
Re: Insert cmd remotely line Bat ?
Posted: 21 Jul 2010 00:01
by phillid
To do that remotely, maybe use a shared server path if you're on a LAN, and call the batch file with arguments???
Try this quick program:
Code: Select all
@echo off
title Argument Test
echo.
echo Login: %1
echo Password: %2
To use this, type this:
Code: Select all
[the name of the program] [the login] [the password]
It will show you what you typed. You could take this further and put password verification, but just like aGerman, I'm not quite sure what you are trying to do.
Hope I helped someone!
phillid