Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

kill running process from the task manager


2 replies to this topic

hsong3

hsong3
  • Members
  • 89 posts

Posted 30 August 2005 - 15:15

hello

in my application, i have this exe file that does not stop even when the entire applicaiton is closed. (i can view it from the task manager.)

the problem is that my installer (during install and uninstall) register/unregister this file and because this application is still running, my installer stops with an error.

i am trying to search this application and kill this process when i start my installer with the script. can installer access windows task manager and kill the process?

(i was thinking of having a separate batch file that can search and stop the process and use it as custom actioin from the binary table. but i am not good at windows programming and i don't know how to control this from the batch file (not even know where to begin...))

thank you

NHVirtuoso

NHVirtuoso
  • Members
  • 4 posts

Posted 30 August 2005 - 22:31

Hello,

Take a look at the command line arguments for taskkill.exe found in [WindowsSystemFolder]

Cheers,
~~~
Bryan Garretson
DesktopStandard Corp.
BGarretson@desktopstandard.com

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 30 August 2005 - 22:44

Before you read on: this is not recommended.

Be aware that this practive may requires extra priviliges: not every process can access another process and decide what to do with it. Certain processes (lsass.exe, winlogon.exe) cannot be stopped.

I don't think that batch files can do this, unless you build your own program and let your batch file run that program. For an alternative, check out a technology called "Windows Management Instrumentation", which has possibilities to enumerate all processes and stop them.

For a sample, look here:
http://www.microsoft...hd/default.mspx

Edited by Zweitze, 30 August 2005 - 22:45.