You could try something like this:
# ---- vitaly.mak ----
target1:
# create and invoke a temporary cmd file
@<
I think a cmd/bat file run within nmake.exe cannot affect the environment of nmake. So you must use the password that you grabbed from the secret.txt within the temporary cmd file.