Problem with option --log-file in pgp

the logs file is not generated after decrypting using the --log-file option.

Do you have an idea how to generate logs via this option

thank you so much

Hi Abdel,
how are you using the option in particular?

(There are several ways and several components that use an option,
you could try starting the component in question on the command line to see what it outputs.)

Best,
Bernhard

Hello Bernhard

Thank you very much for your reply.

I use the option in the script below as follows, when I execute the command, my log file is empty

Dim sGnupg: sGnupg = “E:\GNUPG\GnuPG\bin\gpg.exe”
Dim sPassphrase : sPassphrase = “E:\APPLI\psecrete.txt”
Dim log_file : log_file = “E:\APPLI\log.txt”
Dim sCommand_Text
Dim sFileName_Input: sFileName_Input = Nom_File
Dim sFileName_Output: sFileName_Output = Nom_File_out

Dim oWiSH_Shell: Set oWiSH_Shell = CreateObject(“WScript.Shell”)

sCommand_Text = Chr(34)& sGnupg & Chr(34) & "–homedir "& Chr(34) & “C:\Users\S76543\AppData\Roaming\gnupg” & Chr(34) & " --pinentry-mode loopback --passphrase-file " & Chr(34) & sPassphrase & Chr(34) & " -o " & Chr(34) & sFileName_Output & Chr(34) & " -d " & Chr(34) & sFileName_Input & " --log-file " & Chr(34) & log_file & Chr(34)

oWiSH_Shell.Run sCommand_Text, iWindowStyle, bWaitOnReturn
Set oWiSH_Shell = Nothing

Best,
Abdel

Hi Abdel,
for --log-file to work, you also need to give --batch in the 2.2.x versions of GnuPG.
See https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html#index-log_002dfile-2

Hope this helps!
Bernhard