Solved

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

Posted on 2006-06-21
6
173 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
6 Comments
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now