Thanks for the reply...
The issue appears to be "setting" the variable that contains special characters (like the & for example). If I go to a command prompt and type in:
set adpw=abc&123
It doesn't set adpw to equal abc&123, it responds with the following error message:
'123' is not recognized as an internal or external command, operable program or batch file.
If I enclose the variable in quotes, it works fine... The problem is, I'm using the /P switch and setting the variable using input that the user types in... And I can't find a way to surround what they type at the prompt in quotes as the variable is being set. Of course I could probably ask them to "surround their password with quotes", but would prefer not to do that (if possible).
Main Topics
Browse All Topics





by: QlemoPosted on 2009-04-16 at 09:28:14ID: 24159551
In most cases it is sufficient to use the variable in quotes, as in
echo. "%adpw%"