Posted March 07, 2011
Kabuto: I'm a little confused on what your trying to say. I'm also trying to comprehend your batch file. You delete setup.exe from c:\ and then copy the local setup.exe to c:\. So what's the point of the loop exactly if you've already instructed it to copy the new setup file to c:\? That if statement will always be true otherwise you'll get an error said file is missing at the start of the loop when you first go to copy and the program will fail.
I've tested it. It works. Maybe I'm not the best coder, but it's a simple job and this gets it done. del c:\setup.exe
Deletes any instance of "setup.exe" in the C:\ directory to prevent any "file already exists" problems.
:loop
Start of loop
copy setup.exe c:\
Copies the setup file, providing it exists, to C:\.
if exist c:\setup.exe goto :eof
Quits the program if setup.exe exists in C:\. Since any instance of setup.exe in C:\ has been deleted, the program will only close upon success.
goto loop
Continues the process of attempting to copy setup.exe to C:\, checks if the program should continue.
I don't see any errors. The program itself should explain anything you'd need to know. :/