Create a log file

Hello

I need to create an installation log so that for silent installations I can write messages like Folder/file not found , and other log messages

and ideally the exit code values (i.e. for Error while decompressing files)
Is that feasible ?

Can the custom action “write text or variables to a file” be used for such purpose ?

Yes, except the %EXITCODE% but you can catch it if you run the installer EXE file from console or batch.
It’s possible to write text to a log file and you are right it’s with "Write text or variables to a file”.
You can repeat this action several times for the same file and with different content, since contents is added to the end of the existing file. It’s perfect for log files indeed.