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 application is requesting for admin privileges without any reason
Forum Updated to NodeBB v4.3 + New Features

Qt application is requesting for admin privileges without any reason

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k Views 1 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.
  • F Offline
    F Offline
    fscibilia
    wrote on last edited by
    #1

    Hi all,

    I've just started development of a Console application in Qt and, when I start it from within QtCreator it fails with the following message: "Failed to start program. Path or permissions wrong?".
    After I while, I discovered that if I "Run as administrator" QtCreator everything works.

    Why? My application simply processes a local XML file and prints its content on the screen. I don't need and I don't want it to request for admin privileges.

    The .pro file contains the following lines:

    QT += core xml network
    QT -= gui
    TEMPLATE = app

    And of course, SOURCES, LIBS and the rest.

    Thanks

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, if you start your Console application from a CMD window, does it still fail with the ".. permissions wrong" message?

      Note: to be able to start your Qt program from a CMD window, you probably need to first invoke qtenv2.bat (in the bin directory) so that the Qt DLLs can be found.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fscibilia
        wrote on last edited by
        #3

        Yes!

        Windows asks me to allow the program to make changes to this computer via the canonical message box (background greyed and so on). Why? I don't have set any special in my application.

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          Hmmm, I see you include network, could it be you're opening a TCP port below 1024?

          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