I was making a batch file that was able to create a vbs coded file I had already made but when I tried running the file it kept trying to run the vbs code as a command and not put it in the file the code that gave the errors are
set line5=set objWMIService = getobject("winmgmts://"_& strComputer & "/root/cimv2")
echo %line5% >>password.vbs
this one tried to run the strComputer as a command
set line20=strComputer = "."
echo %line20% >>password.vbs
this one tried to run the strComputer part but I have one like that and it works just fine
set line21=strExe = "explorer.exe"
echo %line21% >>password.vbs
in this one it is trying to load the strEXE as a command
set line49=WScript.echo "Created: " & strExe & " on " & strComputer
echo %line49% >>password.vbs
for this last one the program is trying to run " on " as the command
So if anyone reading does not understand my problem I will say it again what I am trying to do is save the vbs code into a file but the batch window keeps on trying to execute random commands that I am trying to put in the file which makes it not put them in and give me errors making the file not work correctly I am going to say this in advance thank you to anyone who tries to help