I want to create a Windows batch file that accepts parameters and uses it inside. For instance, when I type "sample.bat -username admin -password pass123" in the command line, it will store "admin" and "pass123" in the variables inside sample.bat
This is how I do it in Linux:
USERNAME=
PASSWORD=
while [ $# -ne 0 ]
do
case $1 in
-username*)
USERNAME=$2
;;
-password*)
PASSWORD=$2
;;
*)
;;
esac
shift 1
done
I'm not used to making scripts in Windows but I need to do a Windows counterpart for this one. Kindly help me. Thank you so much!