Disable command history in a windows batch file
Short answer
doskey /reinstall
This erases the complete history.
A second way could also to start a new cmd.exe instance in your batch, this would only remove the history made by your set/p
statements.
@echo off
if "%~1"==":historySafe" goto :historySafe
cmd /c "%~f0" :historySafe
exit /b
:historySafe
set /p var=Password
echo %var%
exit /b