Hi Guys,
I've got a small issue passing the string from command line parameter into the variable within the script.
An issue is when the parameter contains an equal mark in the string that brakes the line and the everything after an equal mark is missing. See an example:



echo %username%
echo %password%


When I run the script as follow:

c:\script.bat John mypass&*(+=word&*

As you can observe everything after "=" mark has been skipped and variable %password% returns only part of the string mypass&*(+ and word&* is missing.

My question is whether can it be fixed some how and pass the string containing "=" mark from parameter into variable within the script?

Any help, feedback would be appreciated.

use double quotes to pass the values. But take care that quotes would also be taken as part of value

This question has already been answered. Start a new discussion instead.