Hi All,
I have written a couple of functions to utilize pgp command line encryption software. I was trying to add error handling to these functions, but I am running into trouble. I think I may be misunderstanding the Shell.
Here is the string I am sending to shell:
This runs just fine if I use
However, when I try to capture the return value
It does not run at all. I was expecting it to return 0 if successful, and some non-zero error code if not.
For the meantime, I have added error handling based on a brief wait followed by checking for the existence of the output file, but I would like to be able to capture error codes returned by pgp.
If anyone has advice on what I'm doing wrong I'd be very grateful.
Thanks for reading,
Alex
Ignorance of certain subjects is a great part of wisdom
I have written a couple of functions to utilize pgp command line encryption software. I was trying to add error handling to these functions, but I am running into trouble. I think I may be misunderstanding the Shell.
Here is the string I am sending to shell:
Code:
pgpDeStr = "pgp --decrypt " & InputFile & " --symmetric-passphrase SomePassphrase --output " & OutputFile
This runs just fine if I use
Code:
Call Shell(pgpDeStr)
However, when I try to capture the return value
Code:
retval = Shell(pgpDeStr)
For the meantime, I have added error handling based on a brief wait followed by checking for the existence of the output file, but I would like to be able to capture error codes returned by pgp.
If anyone has advice on what I'm doing wrong I'd be very grateful.
Thanks for reading,
Alex
Ignorance of certain subjects is a great part of wisdom