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. [Qt Installer Framework] How to give multiple parameters in component.addOperation("Execute"...);

[Qt Installer Framework] How to give multiple parameters in component.addOperation("Execute"...);

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 471 Views
  • 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.
  • A Offline
    A Offline
    akhi95
    wrote on last edited by
    #1

    Hi, I need to execute echo "hello" > /etc/temp.txt. For that there is "Execute" operation at https://doc.qt.io/qtinstallerframework/operations.html

    The syntax for multiple parameters is given but I'm not able to decode it. I have tried a few things but nothing worked. Can someone decode it for me?

    JonBJ 1 Reply Last reply
    0
    • A akhi95

      Hi, I need to execute echo "hello" > /etc/temp.txt. For that there is "Execute" operation at https://doc.qt.io/qtinstallerframework/operations.html

      The syntax for multiple parameters is given but I'm not able to decode it. I have tried a few things but nothing worked. Can someone decode it for me?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @akhi95
      Since you are using redirection (>), I would suggest you may well need to run this via the shell (unless their Execute already does this). So, looking at the syntax, something like:

      component.addOperation("Execute", "/bin/sh", "-c", "echo \"hello\" > /etc/temp.txt", ...)
      
      A 1 Reply Last reply
      1
      • JonBJ JonB

        @akhi95
        Since you are using redirection (>), I would suggest you may well need to run this via the shell (unless their Execute already does this). So, looking at the syntax, something like:

        component.addOperation("Execute", "/bin/sh", "-c", "echo \"hello\" > /etc/temp.txt", ...)
        
        A Offline
        A Offline
        akhi95
        wrote on last edited by
        #3

        @JonB Thank you for your reply. Sorry, I didn't get the notifications. Eventually I made a shell script to achieve my goal. So I didn't get to try your answer but I think it should work

        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