Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

is possible to end a task in xp running by the user?

Posted on 2006-06-21
6
Medium Priority
?
187 Views
Last Modified: 2010-08-05
i am creating an automatic downloader and installer but the problem is that the i need to to end the running process i want update.

the scenario is the following:

the specifi process runs everytime the user startup his computer and it has the same name as another process so the only difference is that this process is executed by the current logged on "User Name". if you run the "Task Manager" you see the process running by the "User Name"  and know what the process is.

now what i need to know is how to end this process identified by the current username.

is it clear?

B!
0
Comment
Question by:José Perez
  • 3
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 250 total points
ID: 16955944
<< has the same name as another process

Very bad idea and not to strait forward. Many spyware applications do this and if you do this also then you run the potential of your program being deleted by many of the free software today. This includes Mcafee,Norton,Windows Defender,SpyBot. All of these programs and more will look up that process name and location in there databases. If the location isn't default then you have a pretty good chance that one of these programs will prompt the user that your process is a virus.

You should change your process name if you want your program to stay alive on a system.
0
 
LVL 2

Author Comment

by:José Perez
ID: 16960084
i made it myself!

now the explanation so i can share the solution.

what i did is to create a fill with the process id, every time the process starts it writes a file with the number of the process id, so to close it i get the handles for this process id and then send a shutdown to the process's handles.

B!
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 16960178
i assume you are ending your process using the PID, would you be using TerminateProcess API? You should first try to close your application the standard way which is to send a WM_CLOSE message.

anyways above comment was only indicating that if you have a process name that is the same name of a windows process then your process will most likely be detected as a virus.
0
 
LVL 2

Author Comment

by:José Perez
ID: 16960213
the "same name" comment is appreciated, i think i can give you some points for it, not all of them, do you think so?

B!
0
 
LVL 2

Author Comment

by:José Perez
ID: 17001786
Comment for moderator.

i would like to assign 60 points for egl1044 because the answer give me an idea to consider for future development and i found the solution by my self.

can it be done?

thanks,

matt.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question