Results 1 to 2 of 2

Thread: run prompt command with multiple parts

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Location
    cobwebbed to PC
    Posts
    311

    run prompt command with multiple parts

    Hi Folks

    At a last attempt to integrate some SSH functionality I'd like to be able to run the prompt command
    Code:
    echo myString | C:\plink.exe testProfile -l userName
    now I can get the later part ok with:
    vb Code:
    1. System.Diagnostics.Process.Start("echo 5| c:\lantronix\plink.exe", "test2 -l admin")

    but how can I put the echo myString part?
    Doesn't matter if its ugly, its just to automate test so we can easily change the values of myString

    Cheers
    Thanks

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: run prompt command with multiple parts

    Have you tried using cmd.exe as the program and everything else is the argument?
    Code:
    System.Diagnostics.Process.Start("cmd.exe", "echo 5| c:\lantronix\plink.exe test2 -l admin")
    You may need to provide the full path to cmd.exe, i.e. "c:\windows\system32\cmd.exe"
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width