Click here to Skip to main content
15,117,318 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I have a windows application in C# with Visual Studio 2012, where I have created a Windows Service and a Task to serve the purpose of my application. The application is built on .Net framework 3.0. My application is getting installed successfully using WIX. Windows service and Task is also getting registered at their respective places. The Windows Service is also getting installed and running through WIX. The uninstallation of the application is also happening rightly.

I can see my Windows Service listed under SCM and service process (myservice.exe) at the Process Tab (show all processes). The Windows Service can be stopped from SCM or the process can be ended.

Is it possible to prevent my users from accidentally or intentionally stop the Service and delete the Task?

Any kind of help will be highly appreciated.
Posted
Updated 1-Nov-14 2:49am
v3
Comments
Mehdi Gholam 11-Oct-14 6:24am
   
Why? sounds you want to do bad things.
[no name] 11-Oct-14 7:50am
   
"It's not like hiding anything", how exactly is hiding your program from everyone not like hiding anything? You are hiding something. I have never heard a legitimate reason for hiding programs away from the legitimate user of a computer. Wanting to do so is extremely suspicious.
Rob Grainger 13-Oct-14 6:17am
   
Hopefully this will prove very hard, the number of potential malicious uses of such a facility are astronomical.
Tutun2014 1-Nov-14 7:41am
   
Actually I don't want to hide, but it is our in-house project where we are monitoring activities on remote connections made by our users and as administrator, we don't want our users to uninstall this program either accidentally or intentionally. the software will be distributed to the users and they themselves will install it on their respective machines, they will the know the purpose of the software. All the machines have admin rights, so any software can be installed or uninstalled. May be, I posted my query in a wrong way, but I just want to prevent my users from uninstalling the program. I have edited my question.

1 solution

If your users are normal every day User account (not Administrators) on their machines, they already can NOT stop the services and kill them, provided your service runs as LocalSystem, nor can they uninstall it.

If you made the monumental mistake of making everyone an Administrator on their machines, you have no way at all of preventing them from killing it off. This is probably what you guys did as you're letting users install software.

Think about it. If the users can install it, they can uninstall it too. There's no way you can prevent it if the users are all Administrators.
   
v2
Comments
Tutun2014 4-Nov-14 13:24pm
   
That is very true. Actually our users need Administrator privilege for research work and testing. May be I can think of some other solution or alarms over the network/http to let us know if someone tries to uninstall the program.
Dave Kreskowiak 4-Nov-14 14:56pm
   
Still won't work. Again, since your users are admins they can stop ANY PROCESS you start, even your "warning" process that monitors the installations.
Tutun2014 5-Nov-14 9:42am
   
Yes, definitely, if they know it or can find it. Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900