Problem in starting custom NT service

Posted on 2000-02-08
Medium Priority
Last Modified: 2010-04-14

We have written a VC++ code to start a java program as an NT service.  (NT 4.0 Service pack 5.0)

But  when we are starting the service we are encountering Dr.Watson error  (access violation).  

It seems that, while installing and/or running the service the user (as which I have logged in ) needs to belong to some user groups like administrator, power user etc.

We shall be glad if you can throw somelight on the various previliges / rights a user needs for installing and/or starting a custom NT service.
(Settings for NT service etc.)

Thanks in advance.

Question by:v_sripada
  • 2
  • 2

Accepted Solution

GHemphill earned 150 total points
ID: 2501842
You need to give the "System Account" access (RWX) to any service folders or files.  What I mean is, if you have a service, the "System Account" is what must have Read, Write and Execute access to it.

Author Comment

ID: 2502732
Thanks for your reply. Being a novice, I am afraid I have not understood it completely.

You mean that I need to set System Account access to the Files / folders used for installation / start/stop of the service?

How do I set the system account to have read, write and execute access??

Can I get a more detailed reply please.

I am using 2 exe files (along with one java.exe) for installing the service. Only one folder contains the required files for running the service.


Expert Comment

ID: 2503808
First of all, my assumptions;

1) The folder your program is in is on an NTFS formatted drive.

2) The program is already setup as a service.

3) The "Log On" is the Local System Account.

The folder must have the security setup so that the Local System Account has at least Read/Execute ability.

Or, you can have the "Log On" set to another account that does have the Read/Execute ability.  If you do it this way, it will not interact with the desktop.  This is done using "Control Panel", "Services", "'your service' Properties".  Then you select the "Log On" tab and you can see what I mean.

You can also put your program in the "WINNT\System32" folder and run it from there.  I don't like this method.

Author Comment

ID: 2503965

Thanks for your reply. Sorry I am dragging this query for long. But I think I should tell the complete story.

We are always logging as administrator  and the log on is always system account for the service.

1. We have installed the service successfully.

2. When we are trying to start the service, on some machines it worked fine and on some other machines it was giving Dr.Watson access violation error. Then we made the administrator belong to all other groups like power users, backup operators etc. then it worked fine (May sound stupid, but it worked)

3. Now on some machines it is giving error no 2186, while starting the service. (That is unable to start the service error message).  We think that this error is occuring on machines which has processors that belong to before pentium era.

This is the story and coming to setting the read/execute ability for the folder,
1. Is it needed for even "system account"?
2. If so, how do I set this ability for a folder for this account??  I followed the steps given in windows help, but the security tab that is talking about is not to be found on my m/c.
Could u tell me in detail how to set it.

You can use my e-mail id : v_sripada@123india.com

Thanks once again.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
AngularJS web development a very simple procedure. So, to put it, in short, AngularJS’ stand out features are – Two-way data binding, MVC structure, directives, templates, dependency injections and testing.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…

624 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