June 20, 2011

Pradeep Biswal Pradeep Biswal
Lab Rat
26 posts

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

 

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

 Signature 

Regards,
Pradeep

4 replies

June 20, 2011

Andre Andre
Robot Herder
6295 posts

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.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

June 20, 2011

Pradeep Biswal Pradeep Biswal
Lab Rat
26 posts

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

 Signature 

Regards,
Pradeep

June 20, 2011

loladiro loladiro
Lab Rat
596 posts

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

June 20, 2011

Tobias Hunger Tobias Hunger
Mad Scientist
3383 posts

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.

 
  ‹‹ QTcpSocket with signal capability      QSqlRelation fails on a NULL in foreign key column ››

You must log in to post a reply. Not a member yet? Register here!