make batch file that write another file [solved]
Posted: 30 Oct 2011 05:28
Hi,
I'm trying to make a batch that write another file and then run it.
the problem is that it write the first line only and ignore the other two lines
I'm using ">>" to write the files
the output file looks like that:
any suggestions... help
I'm trying to make a batch that write another file and then run it.
the problem is that it write the first line only and ignore the other two lines
I'm using ">>" to write the files
Code: Select all
@echo off
color F5
echo Set WshShell = CreateObject("WScript.Shell") >> "%homepath%\desktop\test.vbs"
echo WshShell.Run Chr(34) & "%systemdrive%\x.exe" & Chr(34), 0 >>"%homepath%\desktop\test.vbs"
echo Set WshShell = Nothing >> "%homepath%\desktop\test.vbs"
pause
call "%homepath%\desktop\test.vbs"
pause
the output file looks like that:
Code: Select all
Set WshShell = CreateObject("WScript.Shell")
any suggestions... help
