呼叫在.bat文件中输入 [英] call enter in .bat file

查看:91
本文介绍了呼叫在.bat文件中输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从远程计算机调用.bat文件.在此.bat文件中,我称为.exe文件,该文件运行后,希望用户按Enter. 因此,我的问题是:是否可以通过Enter在.bat文件中进行选择?谢谢你的帮助. 我的.bat文件的代码

I call .bat file from remote machine. In this .bat file I call .exe file, which want user to press Enter, after this .exe worked. So, my question: is there any option to pass Enter in .bat file? Thanks for any help. code of my .bat file

pushd \\server_name\\myfolder\\Reports\\
reportsupload.exe -e "http://mysite/ReportServer"
popd

推荐答案

如果您正在寻找不依赖第三方程序的解决方案,则取决于程序reportsupload.exe如何处理按 ENTER .如果它读取标准输入流,则可能可以通过将行更改为echo. | reportsupload.exe -e "http://mysite/ReportServer"来进行管理.如果是通过扫描键盘上的按键来处理的,则此操作将无效.

If you are looking for a solution that does not rely on third-party programs, that will depend on how the program reportsupload.exe handles the request for pressing ENTER. If it reads the standard input stream, you might be able to manage it by changing the line to echo. | reportsupload.exe -e "http://mysite/ReportServer"; if it's handled by scanning the keyboard for the keypress, this will not work.

可能有一些第三方程序可以配置为检测计算机或程序何时处于给定状态并基于该状态触发操作,但是我不知道有哪些不需要用户干预(例如,按一个键来执行宏).

There may be third-party programs that can be configured to detect when the computer or a program is in a given state and trigger an action based on that state, but I'm not aware of any that don't require user intervention (e.g., pressing a key to execute a macro).

这篇关于呼叫在.bat文件中输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆