Running plink with user input interaction from vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sheauyun
    New Member
    • Apr 2013
    • 7

    Running plink with user input interaction from vb.net

    Hi there,

    I am trying to run a .sh file with plink from vb.net.

    I am now able to run the .sh on vb.net throught plink but i have a problem because the .sh script require user input:
    The .sh is prompting a few question and require user to input y/n to proceed.

    I am trying plink.standardi nput.writeline( "y") but it looks like this input is not feed to the .sh script but rather to the plink session after the .sh script ended.

    Any idea about this or is there any other way for this?

    Thanks
  • sheauyun
    New Member
    • Apr 2013
    • 7

    #2
    No one have any idea bout this? I think I am totally no idea how to insert the user input to the linux .sh.

    Comment

    • Oralloy
      Recognized Expert Contributor
      • Jun 2010
      • 988

      #3
      sheauyun,

      Try creating an input file for your shell script, then execute the shell-script using input redirecton to read the file.

      Unfortunately I don't have VB at the moment, but something like this:
      Code:
      /...path.../plink < /...path.../in-file
      Hopefully that helps,
      Oralloy

      Comment

      • sheauyun
        New Member
        • Apr 2013
        • 7

        #4
        Originally posted by Oralloy
        sheauyun,

        Try creating an input file for your shell script, then execute the shell-script using input redirecton to read the file.

        Unfortunately I don't have VB at the moment, but something like this:
        Code:
        /...path.../plink < /...path.../in-file
        Hopefully that helps,
        Oralloy
        Oralloy,

        Thank you for your recommendation but I actually need to execute the shell-script first. Then depend on user to key-in y or n after they confirm the result.

        Any other idea to do this?

        Thanks

        Comment

        Working...