Hello All,
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.
This is the content of my batch file:
ECHO OFF
Start /d "C:\" DEL aa.txt
Simple isn't it! It deletes the file BUT always opens a DOS prompt and I 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!