VB.NET Encrypt a File with PGP using Command Line

CipherIS
CipherIS used Ask the Experts™
on
Trying to write VB.NET code in SSIS (Script) that will encrypt a file with PGP using command line arguments.

Any Ideas?
PGPCmdLineGuide.pdf
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I don't know if SSIS can run an external script file, but here's a VBScript function I use to encrypt files:
Public Sub EncryptFile(DecryptedFilename, Options)
  Dim oWScript
  Dim sPath
  
  sPath = "gpg " & Options & " "
  sPath = sPath & Chr(34) & DecryptedFilename & Chr(34)
  
  Set oWScript = CreateObject("WScript.Shell")
  oWScript.Run sPath, 6, True '6=WshMinimizedNoFocus
  
  Set oWScript = Nothing
End Sub

Open in new window

Author

Commented:
its not what i need.  figured it out though

Author

Commented:
needed it to work in SSIS

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial