# Service won't start



## gmorse (Sep 5, 2007)

Hello, I'm a little new to COM/DCOM, and have been tasked with resolving an issue that one of our customers is having with our COM application on some of their machines. Whenever they try to start up the service, it starts and stops immediately. We had them open the properties for our application under component services and noticed the "Run application on this computer" checkbox is unchecked (it is typically checked) and greyed out on all of the machines that are having the problem, and I believe this to be the underlying cause of the problem. This app was working fine for a few months on all of these machines, so it was originally installed properly. Was there a Microsoft security update released recently that might be causing this? The machines are all XP SP2.

Any help is greatly appreciated.


----------



## goldhat (Aug 12, 2007)

i hope this works for ya

save this text as a bat extension (%yourservice% in the text is the service you want to start)


```
sc config %yourservice% start= demand 
net start %yourservice%
```


----------



## goldhat (Aug 12, 2007)

also what program do you think is causing the problem


----------



## gmorse (Sep 5, 2007)

Thanks for the quick reply.

I honestly have no idea what is causing the problem, as the customer says that the service stopped working on its own and nothing was done to the machines that are having the problem. That is why I thought it might have been a Windows update, or something else that runs automatically.

Anyway, I tried what you suggested. I assume the first line was supposed to check the "Run application on this computer" checkbox. It doesn't appear to be working.


----------



## goldhat (Aug 12, 2007)

what is the service that wont start ?


----------



## gmorse (Sep 5, 2007)

It's our service, called "CertiTAX COM Client".


----------



## foofoo (Sep 6, 2007)

Does the log file give you any insight as to what the problem is?


----------



## gmorse (Sep 5, 2007)

The log is as follows:

2007-08-22 16:01:54.517 (0x00001258) - ERROR: CServiceModule::IsOperatorCommon(1493) - The trust relationship between the primary domain and the trusted domain failed.
2007-08-22 16:01:54.517 (0x00001258) - ERROR: _tWinMain(4705) - You do not have sufficient privileges to perform this operation.

This is with the "Run application on the following computer" checkbox checked and one of the "good" machine names entered. I assumed these errors were being caused due to the attempt to connect to a seperate machine. But they shouldn't have to connect to the other machine to run the service. The "Run application on this computer" checkbox should be selectable, not grayed out.


----------



## foofoo (Sep 6, 2007)

Just guessing here: Has the customer created new user logins (a no-change change, just removed administrator privileges), and the users don't have the privilege needed to run the service any longer? If so, they wouldn't be able to Run/Start the service, and hence they can't select Run on this computer via the check-box.

If so, log into the machine as admin, and see if the problem goes away.


----------



## gmorse (Sep 5, 2007)

That was my first thought as well. They assure me this is not the case, though we know what people say and what they do aren't always the same  Do you happen to know of any command line command that I can run to change the DCOM properties and force the "run application on this computer" option to be selected, thus working around the checkbox being greyed out? Even if the command doesn't work, it's possible it will give me more information about why it is grayed out.

Thanks


----------



## foofoo (Sep 6, 2007)

Sorry, but I have no knowledge of any command-line options of this nature.
I know of a utility (purchased) that allows you to run services at startup, regardless of privileges, but I think it is easier (and cheaper) just to log in as administrator and see if access to the options changes.


----------



## foofoo (Sep 6, 2007)

Try the SC command, i.e. sc config (or qc or query) .....

From a Squashman post, see here: 
http://www.ss64.com/nt/sc.html


----------

