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. How to kill a windows process if running from my Qt Application?
Forum Updated to NodeBB v4.3 + New Features

How to kill a windows process if running from my Qt Application?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 6.9k 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.
  • P Offline
    P Offline
    prbiswal
    wrote on last edited by
    #1

    I am working on an Installer which is implemented in Qt.
    During un-installation (using this qt installer ) this should kill a windows process if its running.
    So my point is : Is its possible i can get the list of processes which are running and i can get the PID and kill them using Qt APIs?

    Thanks in advance.

    Regards,
    Pr

    Regards,
    Pradeep

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      No, Qt does not have API for that. You'll have to use platform specific API's. That should not be a problem, since installers are generally windows-specific anyway.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prbiswal
        wrote on last edited by
        #3

        that means i have to use windows specific apis in my Qt App. the thing is this installer can be used on Unix too.

        Regards,
        Pradeep

        1 Reply Last reply
        0
        • L Offline
          L Offline
          loladiro
          wrote on last edited by
          #4

          I would suggest you use the appropriate linux packaging system for deployment on linux.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            You can use #ifdef Q_OS_WIN or something to mask out your windows code when not building on windows or put the OS specific code into separate files and have the build system sort out which object files to link together.

            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