I know there are many similar question but still not able to make it work.
I have a simple batch that accepts several parameters, one of them is a password which may include special characters.
The batch should run some .exe with the parameters that were sent to the batch.
Test.bat param1 param2 !@#$%^&*()_+
How should I handle the parameter with special characters ?
I tried using this code and also escaping the special characters with ^^ ^& etc.
SET PASSWORD=%3
SET "PASSWORD=%3"
setlocal enabledelayedexpansion
SET "PASSWORD=%3"
echo !PASSWORD!