You are not logged in.
Pages: 1
Please,I want to pass value include = in parameter but when i pass this value it will be next parameter
Sample
Call test1.bat A=1
Expect
echo %1
A=1
Result
echo %1
A
echo %2
1
Offline
Please,I want to pass value include = in parameter but when i pass this value it split 2 parameter
Sample
Call test1.bat A=1Expect
echo %1
A=1Result
echo %1
A
echo %2
1
Offline
You need to quote the string like this:
Call test1.bat "A=1"
Then in test1.bat you need to use the ~ to remove the quotes like this:
echo %~1
It is good practice to almost always use quotes when passing parameters. That resolves the whitespace problem in the parameter... which you may not have now but could have in the future.
Windows Shell Scripting and InstallShield
Offline
Pages: 1