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] Qt Application can not be killed by cmd
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt Application can not be killed by cmd

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.0k 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 already asked why I can not minimize / maximize application built with Qt using ShowWindow... Now I am trying to kill it / terminate using command line... And I figured out I can not kill it if CMD is not run with administrator rights... I can kill Notepad.exe or any other Qt application, but just that one not...

    "Here":http://qt-project.org/forums/viewthread/44301/ is problem with minimize / maximize

    I believe these two things are connected... I can not minimize / maximize / kill application due to lack of rights... Any idea what is the reason application is requesting so many rights... How can I kill it if I don't run command line / powershell with admin rights?

    This also gives me error due to lack of rights... Is there a way to run system() with admin rights?
    @system("taskkill /pid <pid>)@

    bq. ERROR: The process with PID 7745 could not be terminated.
    Reason: Access is denied.

    I am administrator and I also gave all permissions to the app... But still does not work...

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

      Code below did the magic :)
      @ShellExecute(0, L"runas", L"cmd.exe", L"/C taskkill /F /pid 2104> out.txt", 0, SW_NORMAL)@

      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