Have a look at my batch file below. As you can see, I'm a pretty novice scripter. But, here is what I'm trying to accomplish.
Create a TEMP folder to copy another folder and its contents from a server to another server. Then copy folder contents, that much works. But the START of the first .exe provides me a need to answer 2 question. They need to be answered as a keypress of 1, and the second question needs a 0 to be entered, then the AppRemover6.exe will run. I've tried to use echo but I'm missing something or syntax is incorrect.
I also want the first exe to finish completely before going to the next exe.
As for the reg file, a windows pop-up needs to be answered automatically with an answer (mouse click) of YES to make the registry change.
@ECHO OFF
MD -P C:\TEMP
XCOPY "\\mybigserver\Apps\AppCleanerUtils" C:\TEMP /E /I
START /D "C:\TEMP\AppCleanerUtil6" AppRemover6.exe
START /D "C:\TEMP\AppCleanerUtil6" PatchRegistry.reg
START /D "C:\TEMP\C:\TEMP\AppCleanerUtil5" AppRemover5.exe
RMDIR /S /Q "C:\TEMP\AppCleanerUtil6"
RMDIR /S /Q "C:\TEMP\AppCleanerUtil5"
If there is a better way to do this?