I'm working on a BAT script that takes a password as an argument. I'd like to remove all mentions of the password from the command history and the output window. I added this to the end of my script:
cls
doskey /reinstall
The first time I ran my script, it worked exactly as intended. When I ran it a second time, though, it looks like doskey didn't do anything. I press the ▲ key and still get the command coming up.
Why does this only work once? How can I get this to work for multiple runs of the script? When it's being used for real, I expect it to be run back to back.