-
May 6th, 2008, 12:01 PM
#1
preventing to kill application
Hi all,
I want some idea...how should i prevent my VB application to be killed from the task manager.
I want my application always running....and if it is killed from task manager...Another instance of this application automatically executes.
Cam you Please help me...or Can you please tell me if any event is fired when application's exe is killed from task manager.
I have tried this with QueryUnload and Unload event...but it do not work.
Please provide me some solution for the problem.
Thanks in advance,
Ruhii.
-
May 6th, 2008, 12:12 PM
#2
Re: preventing to kill application
If you want, your app should run all the time then make it Windows Service.
-
May 6th, 2008, 12:23 PM
#3
Re: preventing to kill application
What kind of program are you making? If the user can't kill it, then what if it messes up? Then what? Reboot?
Use a Windows Server, and only allow one app in Terminal Server mode, and they'll get logged off if they kill the app.
-
May 6th, 2008, 01:39 PM
#4
Re: preventing to kill application
To add to what Shaikh.Riyaz.a said...
You will have to make a service that is run as administrator. Search Google. It will return many results on how to make a service in Visual Basic 6.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 6th, 2008, 01:48 PM
#5
Re: preventing to kill application
Or maybe have proper rights set-up on the system for the users. After all Network administrators know how to do this, they should be able to help you out.
-
May 6th, 2008, 11:59 PM
#6
Re: preventing to kill application
can u please suggest me some other solution except making it a service?? Because of some reason i cannot make my application a service.. Can u please tell me what event is fired when an application's exe is killed from task manager so that i can restart my application at that event.
Thanx
Ruhii
-
May 7th, 2008, 12:32 AM
#7
Re: preventing to kill application
Originally Posted by dglienna
What kind of program are you making? If the user can't kill it, then what if it messes up? Then what? Reboot?
Use a Windows Server, and only allow one app in Terminal Server mode, and they'll get logged off if they kill the app.
Not sounding good
-
May 7th, 2008, 02:16 AM
#8
Re: preventing to kill application
Originally Posted by Ruhii
Can u please tell me what event is fired when an application's exe is killed from task manager so that i can restart my application at that event.
Um...if your application is killed, what other application are you going to use to tell that it isn't running??? There isn't an event fired...it's the absence of an event because it isn't running.
Creating a service truly is the only pure solution to this problem.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 7th, 2008, 02:43 AM
#9
Re: preventing to kill application
Originally Posted by Ruhii
can u please suggest me some other solution except making it a service?? Because of some reason i cannot make my application a service.. Can u please tell me what event is fired when an application's exe is killed from task manager so that i can restart my application at that event.
Thanx
Ruhii
The proper solution to your problem is present in Post # 5 and Post # 2. You can choose either of the two.
-
May 7th, 2008, 06:23 AM
#10
Re: preventing to kill application
I can make a service for windows xp/9X but how can i make the services in vista...???
-
May 7th, 2008, 06:49 AM
#11
Re: preventing to kill application
Creating a service in Vista is the same as XP. The only difference is that you need to run cmd.exe as an administrator in Vista. Then, all you need is sc.exe.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 7th, 2008, 07:01 AM
#12
Re: preventing to kill application
thanx a lot.
But can u please tell me how this can be done through VB code??
-
May 7th, 2008, 07:32 AM
#13
Re: preventing to kill application
A service is just an application.
http://www.daniweb.com/forums/thread85237.html
EDIT: Note that sc.exe is used to install applications as services. You don't just make a service from VB6. You create an application, and then install it as a service.
Last edited by PeejAvery; May 7th, 2008 at 07:35 AM.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 7th, 2008, 08:40 AM
#14
Re: preventing to kill application
Try this:
1) Create new exe different from your application.
2) Use timer control in it.
3) In timer event fire following query using script.
Code:
SELECT Name FROM Win32_Process WHERE Name = 'MyApp.exe'
4) Is nothing is returned then it means that you need to restart your application, Otherwise your app is running.
But here again if this exe is killed then there is no way to restart app.
So the better way would be to create service app. But this trick just came to my mind!
-
May 7th, 2008, 12:00 PM
#15
Re: preventing to kill application
Thanks for ur Help.
Can u tell me that making an application a service will work in vista or not??
Is there any way to hide the process from task manager process list??
I found an activeX control called win padlock which hide my Vb application from task manager but it is not working in Vista.
So basically i m facing this problem that how to prevent my process to be killed or to remove it from process list in all Windows OS including Vista??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|