Reputation: 41
Hello i need help with my batch file im working on i'm trying to get a batch file to write a vbs for the input box
`echo B = InputBox("PLEASE ENTER PROMETHEUS PASSWORD") > B14.vbs
echo if B <> "jp030700" then >> B14.vbs
echo h=msgBox("INCORRECT",16,"Prometheus - Verify") >> B14.vbs
echo Set ws=CreateObject("WScript.Shell") >> B14.vbs
echo ws.Run ("TASKKILL.exe /F /IM cmd.exe"), 0 , True >> B14.vbs
echo wscript.Quit >> B14.vbs
echo end if >> B14.vbs
echo if B = "jp030700" then >> B14.vbs
echo end if >> B14.vbs
pause`
i tried to write this to B14.vbs as you can see all i get is this in the file created B = InputBox("PLEASE ENTER PROMETHEUS PASSWORD")
and nothing else please help me
Upvotes: 1
Views: 672
Reputation: 14304
You're very close. When you want to print an actual <
or >
in batch instead of using it as a redirection symbol, you need to use ^
to escape the character.
Change the second line of your script to echo if B ^<^> "jp030700" then >> B14.vbs
Upvotes: 1