Write to Standard Input

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rzaleski@gmail.com

    #1

    Write to Standard Input

    For some reason my application is not writing to Standard Input. Here
    is my code:

    Dim pInfo As ProcessStartInf o
    Dim errors As String = ""
    Dim errorEntry As ThreadStart

    pInfo = New ProcessStartInf o("C:\Program
    Files\GNU\GnuPG \gpg.exe", "-r rzaleski@airsep .com -o C:\out.txt
    --decrypt C:\test.txt.gpg ")
    pInfo.CreateNoW indow = False
    pInfo.UseShellE xecute = False
    pInfo.RedirectS tandardInput = True
    pInfo.RedirectS tandardOutput = True
    pInfo.RedirectS tandardError = True
    _process = Process.Start(p Info)

    _process.Standa rdInput.Write(" TEST")
    _process.Standa rdInput.Flush()
    _process.Standa rdInput.Close()

    It never writes "TEST". It is waiting for the passphrase to be endered
    (this is obviously for decrypting a file encripted with gpg).

  • rzaleski@gmail.com

    #2
    Re: Write to Standard Input

    Sending --passphrase-fd 0 as a parameter fixed it.

    Comment

    Working...