当我运行以下查询时,程序会打开,但仍然会询问参数,而不是从start命令中获取参数。我这里没有运行批处理文件,请更正我的错误声明。
START "TESTING" /D "D:\Work\ORMB DB Upgradation work\ORMB_DB_Upgrade_2.3.0.2.0_to_2.4.0.0.0\FW\FW42020\FW42020-HFix47\" /MIN /HIGH CDXPatch.exe "O" "schema_user" "schema_pass" "db_name" "Y"
到目前为止的讨论已经产生了以下命令作为最佳解决方案:
echo.O&echo.user&echo.pass&echo.db&echo.Y | "Path\CDXPatch.exe"
它产生了以下错误:
答案 0 :(得分:0)
将其放入主批处理文件中(将CDXPatch.exe
替换为CDXPatch.bat
*):
START "TESTING" /D "D:\Work\ORMB DB Upgradation work\ORMB_DB_Upgrade_2.3.0.2.0_to_2.4.0.0.0\FW\FW42020\FW42020-HFix47\" /MIN /HIGH CDXPatch.bat "O" "schema_user" "schema_pass" "db_name" "Y"
然后将其放入CDXPatch.bat
(编辑以支持任意数量的参数):
@(for %%a in (%*) do @echo.%%~a) | CDXPatch.exe
* CXDPatch.bat
必须位于%PATH%
中指定的目录中,或者您必须指定完整路径(例如C:\User\CDXPatch.bat
)。