I have a Windows .bat script in which I try to run a command with password in parameter. The password I want to be able to use is ~!@#$%^&*()_+|-=][{}';:"/.>?,<
.
From what I've read here, I should escape ^&|<>
with ^
. From what I assume, I should escape "
with "
.
This gives me something like that:
runme.exe /password:"~!@#$%^^^&*()_+^|-=^][{}';:"/.^>?,^<"
But it doesn't work - my target app responds with logon failure.
How should I escape all these characters to be able to hardcode the password in my batch (ignoring the security issues by now)?
See Question&Answers more detail:os