?
Solved

prevent uninstalling services

Posted on 2010-01-07
8
Medium Priority
?
444 Views
Last Modified: 2013-12-17
i have 2 services which constantly monitoring one another. if user wants to stop any one of them another service starts that once in no time. so user can not stop that services. but if user give "sc" command from dos window, he can uninstall those services. all of my users are administrator in there own pc. they are using xp sp3.

now my question is, can i apply any trick so that user can not uninstall those services from their pcs?

my services are developed in vb.net 2005.

thanx
0
Comment
Question by:Amitava_Mukherjee
7 Comments
 
LVL 3

Assisted Solution

by:Saber37886661
Saber37886661 earned 400 total points
ID: 26208183
Yes you can, but not really in the way you are thinking.

What you need to do is run 3 services that each other.
I say 3 services because the user can stop/ unload the services still, but you are counting on the fact that they cant kill all 3 at once.

In saying that, we did implement something simular a few years ago and found that if someone wanted to do a little bat file or 2 then they could kill an almost unlimited number of services. It all comes down to speed: can your application spawn new services before they are killed?.

Otherwise there is no way that I am aware of that can stop the user uninstalling services. Even applications like Norton can be stopped if you have the mind to.

Hope it helps
0
 

Author Comment

by:Amitava_Mukherjee
ID: 26208281
but i am not still clear how to prevent uninstallation of a service
0
 

Author Comment

by:Amitava_Mukherjee
ID: 26280515
can i prevent uninstalling forcing user to give password to uninstall?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:Amitava_Mukherjee
ID: 26280979
Saber37886661,

your comments seems to be interesting. can you clarify a little more?
0
 
LVL 39

Accepted Solution

by:
abel earned 1600 total points
ID: 26351744
Personally, I find the combination of having people logged in as Administrator and then telling them "you have no right to uninstall" violation of the principle of what an Administrator is. The simplest thing to do is to do it with rights management, but I'm no expert in that field, but you can ask it in the Windows zone. Perhaps: install the services with a domain account, local Admin has no rights over domain accounts.

Another opinion (I know you didn't ask for this): if a process is unstoppable, I consider it a buggy program and I will take that extra length to uninstall it. And whatever you do, that will always be possible (even viruses can be removed, and this is viral behavior).

But to the point: services are installed in a key called (top of my head) HKLM/SYSTEM/CurrentControlSet/Services. Monitor the key(s) that hold your services. If they change or get deleted, add them again (i.e.: if they're uninstalled, immediately reinstall them). Simple enough to do and a real pain for anybody trying to uninstall. Also: do the same with the executable and the PendingMoves key in the registry and you've made it pretty airtight.

Really preventing people taking control of their own machine is simply impossible (or we'd be flooded with malware that we cannot remove). But you can make it quite hard.
0
 
LVL 14

Expert Comment

by:jake072
ID: 26359582
I agree with able.

There is no way to GUARANTEE that the service will not be uninstalled.  Take Safe Mode, for instance.  If a user is determined enough, your hosed, period.

But monitoring able's suggestions will go a long way to making it VERY difficult.

Jake
0
 

Author Closing Comment

by:Amitava_Mukherjee
ID: 31674441
Thanx, abel, it works. nice solution
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

807 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