one doubt.. i had rectified the erors in the source as its some server errors.. D anyway one doubt regarding the code. am running this program with an admin privileged account. but i could nt install or start programs like calc ,cmd etc
I was looking on the web for code like this. I happened to try something similar, but I kept running to problems. Basically, I would get an error from OpenService() saying that the specified service was not installed. This was totally frustrating because I could start services on my local machine using "NET START" but not my program. Well, I found out why...I thought I would share this info with others. The problem is that Windows has two names for the services, the display name and the service name. Unfortunately, you can't put the display name into OpenService(). You have to get the service name using GetServiceKeyName() then pass it into OpenService. Some services' display name and service name are the same.
When trying to connect to a Windows XP machine, OpenSCManager keeps replying 'acces is denied'.
I understand what does happen but don't know what to do to solve the problem (either connect to XP with different user rights or change something locally in Windows XP so that remote computers can access the Service Manaer Database).
Any ideas on how to set the service's "Log On" identity programmatically? When the service is installed the identity defaults to "local system". It would be great to be able to set this using your techniques.
I am a begianer at this and would like to know do I have to go into DOS to in still this or at windows?
I would like to learn all I can to programing and would love all the help I can get ti do this.