在命令提示符下运行Windows脚本(.bat)时如何避免提示输入密码

我是写Windows脚本的新手。我的服务器中有Windows脚本(.bat文件)。 我正在从命令提示符运行该蝙蝠文件。我的要求是连接到数据库 每次运行时都不会询问密码manullay。脚本应使用用户名和 assword,它应该与数据库建立连接。任何人都可以帮助我编写脚本

below script will try to connect to mapr database and will ask us to enter the password but my requiremnt should not ask the password,it need to pass automatically in the scirpt.
 code:
::the script is main process to connect to the database
::written by sudhakar reddy 
:: Get today date,each day to process today's data
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
set day=0
:: connecting to mapr database
echo "connecting to Mapr"
maprlogin password -user surakanti.sudhakar@gmail.com        
cugdonjuan 回答:在命令提示符下运行Windows脚本(.bat)时如何避免提示输入密码

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3048683.html

大家都在问