Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot execute echo command in QProcess with pipe command
Forum Updated to NodeBB v4.3 + New Features

Cannot execute echo command in QProcess with pipe command

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Narthan
    wrote on last edited by
    #1

    Hello,
    i am using qprocess to run this command in qt 4.8 windows
    echo cSTzU8+UPQQwpRAq | openssl enc -d -base64 -aes-128-ctr -nopad -nosalt -k secret

    it works fine when i run this in command prompt, but it is not showing any output while running from qt,

    someone please give suggestion for the above problem to solve.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      It might be a good idea to show the code for how you run it.
      To run a cmd.exe command you often need /c and other
      setup for it to function.
      http://stackoverflow.com/questions/21596104/how-to-execute-a-cmd-command-using-qprocess

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        echo is not a program (there's no echo.exe), so you can't run it via QProcess. It's a shell command so you need to run it from shell (cmd.exe).
        cmd.exe /c echo ....

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved