when I run a BAT command , it paused ,any I need to press a key to continue.
How can it run automatically because I set this BAT as a scheduled task.
Thanks!
Haoqiang
>>
Exactly. Some commands that ask for keyboard input allow for this to be done by redirection, some have switches you can use on the commandline or environment variable settings that tell it to go ahead without prompting, and some, unfortunately, accept that input only in the form of an actual keystroke. Once we see the batch file, perhaps someone will know of the workaround. /Al "Pegasus (MVP)" <[email]I.can@fly.com.oz[/email]> wrote in message news:%23om$OJ$[email]5IHA.2240@TK2MSFTNGP02.phx.gbl[/email]... > Let's have a look at your batch file! > > > "Haoqiang" wrote in message > >> Thanks for your reply! >> I have no "pause" in the command . >> The command shows a description and asks for a press to continue. >> >> "Pegasus (MVP)" wrote: Remove the "Pause" command that you have in the batch file. >>> >>> > - Show quoted text - Use the WSH SendKeys method... [url]http://www.devguru.com/Technologies/wsh/quickref/wshshell_SendKeys.html[/url] Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "notepad", 9 WScript.Sleep 500 ' Give Notepad some time to load For i = 1 To 10   WshShell.SendKeys "Hello World!"   WshShell.SendKeys "{ENTER}" Next ========== Yes, of course, but unless we can see the OP's batch file we can only guess how to invoke the SendKeys method while the batch file is pausing . . . > > "Haoqiang" <[email]Haoqiang@discussions.microsoft.com[/email]> wrote in message > news:CC318ABA-6A59-4906-8794-D62F74667B24@microsoft.com... >> Thanks all of you. >> Because of the network error ,I haven't respond in time. >> It is XXCOPY. >> "You have the XXCOPY Freeware version for a stand-alone computer. >> If you access the remote disk on a regular basis ,you may consider >> acquiring >> a license for XXCOPY-PRO license. >> Press any key to continue..." >>