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. [SOLVED] system() space in path
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] system() space in path

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 936 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello, I have problem executing command using system()... It works fine when I write path without space

    @system("start E://blabla//app.exe")@

    but does not work when I have space in path, and it gives me error "Windows can't find E:/some. Make sure you typed name correctly...

    @system("start E://some folder//app.exe")@

    How can I avoid problems with space? And another question, how can I disable command line to popup? I want it to be hidden...

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Try escape sequences like " system("start C:/Qt/pthinks/bins/"Dheeru bins"/HMIApp.exe");

      Please note that entire directory called "Dheeru bins". It has blank space. You need to include entire directory in string with escape sequence as suggested above.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        It works, thank you... Maybe know how to make command line not to popup?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          I will use powershell instead... Solved

          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