Please Help! - Html In batch file messes up special chars
Posted: 12 Aug 2014 10:04
Why does my batch file code keep going all weird after running internal html? How do I fix this?
f you take the html code and the call for the html code out of the provided code below, the special characters make a bar on the command line window, but for some reason with the html, it wont, why?? Please help!
f you take the html code and the call for the html code out of the provided code below, the special characters make a bar on the command line window, but for some reason with the html, it wont, why?? Please help!



Code: Select all
<!-- :
@echo off
cls
for /f "tokens=* delims=" %%p in ('mshta.exe "%~f0"') do (
set "pass=%%p"
)
REM The Next Line normally makes a bar, but with html in the code, it just shows characters
echo ษอออออออออออออออออออออออออออออป
-->
<html>
<head><title>Password Login</title></head>
<body>
<script language='javascript' >
function pipePass() {
var pass=document.getElementById('pass').value;
var fso= new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1);
close(fso.Write(pass));
}
</script>
<input type='password' name='pass' size='15'></input>
<hr>
<button onclick='pipePass()'>Submit</button>
</body>
</html>