Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-06-21
6
Medium Priority
?
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

721 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