silent batch file (no dos window)
by pmolson2005 - 12/1/11 7:10 PM
I'm a newbie...I have found this code in a forum (claiming it would make the .cmd or a .bat run invisible) But I don't how to make it work!!!
Where do I paste this code? in the batch file? beginning? end? what about the reference to "main.bat" do I replace that with the name of my batch file? Thanks in advc
"---Set WshShell = CreateObject("WScript.Shell")cmds=WshShell.RUN("c:\main.bat", 0, True)Set WshShell = Nothing"
Basically all I'm trying to do is silently execute a batch file to delete a specific file.
Here is my batch file:
Start /d "C:\" DEL aa.txt
Simple isn't it! It deletes the file just fine, BUT always opens a DOS prompt and I have to close it manually
I've tried adding EXIT at the end of my batch file, but to no avail..I'm running this on WinXP
Thanks again for your help!