Regie Baguio
Regie Baguio

Reputation: 241

Batch file - Add a log file for every .exe executed

 for /r %%f in (*.exe) do (start /wait %%f /quiet /norestart @echo "Done" >> E:\WindowsUpdate\Alog.txt)

I want to create a log file for every file that is executed to check its properties with the code above. These files are vcredist (Microsoft Visual c++ updates). But it only creates the log file and writes nothing. Any help will do.

Upvotes: 2

Views: 1307

Answers (1)

Compo
Compo

Reputation: 38604

Those executables should use msiexec.exe which has a standard option for logging information.

`… /quiet /norestart /log E:\WindowsUpdate\Alog.txt`

If this is not what you mean then please update your question with more information because your question talks about logging information and your comment checking a check box.

Upvotes: 1

Related Questions