How to set full path for ffmpeg ffmpeg2pass-0.log file?

ffmpeg is installed in a non-writable location C:Program Filesmydir

Thus I’m getting this error when trying to run 2nd pass:

Error opening file ffmpeg2pass-0.log.
Error reading log file 'ffmpeg2pass-0.log' for pass-2 encoding

Is it possible to set the path where ffmpeg2pass-0.log will be stored? I want to set to use for example the temp folder:

C:UsersUsernameAppDataLocalTemp