Local user has created the service exe Service1.exe using Service1.sln. Then local user has another application say App.exe. From App.exe the local user wants to start the service "Service1.exe" but he is not able to because local user is not an administrator. So, is it possible to build the Service1.exe in such a way that the local user will be able to start the service. App.exe is in C++ and Service1.exe is in C#. I know that I can give the admin permission into the App.exe using a manifest file but I want to somehow give it in Service1.exe so that App.exe can start the service Service1.exe. Is it possible?
Asked
Active
Viewed 154 times
0
-
of course can . need use for this *SetServiceObjectSecurity* after you create service. Visual Studio here absolute unrelated at all – RbMm Apr 09 '17 at 11:56
-
I do not have service handle still because "OpenService(hSCManager, m_lpServiceName, SERVICE_ALL_ACCESS)" call fails in my case because the user running the application does not have admin rights. So I cannot call SetServiceObjectSecurity(hService, DACL_SECURITY_INFORMATION, sd). This is the same solution given in the duplicate question. – Arnoj Apr 10 '17 at 04:20
-
but who install this service ? who install and must call SetServiceObjectSecurity – RbMm Apr 10 '17 at 08:24
-
Local user has created the service exe Service1.exe using Service1.sln. Then local user has another application say App.exe. From App.exe the local user wants to start the service "Service1.exe" but he is not able to because local user is not an administrator. So, my question is: is it possible to build the Service1.exe in such a way that the local user will be able to start the service. App.exe is in C++ and Service1.exe is in C#. – Arnoj Apr 12 '17 at 04:58