PDA

View Full Version : How to ignore startup service failure



jimmyliu
11-21-2005, 10:56 AM
Hi, there,
I have a basic msi project created a service and started it up in install time. But I find my installer can run sucessfully on Win2000 and start service but fail on WinXP and 2003, the failure reason is no privilege. Here I have two problems:
1. When service startup failure, only option is rollback, there is no "Ignore" button there, but in my case, user should be able to ignore this error and continue, after install, manually start it. How to set this option for start service?
2. Why service startup fail on XP and 2003? Any special steps I need to do, the install user is local admin, and my service is running as "LocalSystem", I can manully start it up if I do not startup services during install.
Any help would be appreciated. Thanks.

PhilWilson
11-21-2005, 05:10 PM
1. If your ServiceControl action that starts the Service is set to
"wait for it to complete", it will be treated as critical. Try the "wait for the SCM" option, or whatever it's called.
2. Sounds like you Service might have a dependency that isn't on the system at StartServices time, peraps a Dll, a GAC dependency maybe.

jimmyliu
11-21-2005, 06:28 PM
Thanks, Phil, after I changed to "Wait for SCM", it works for my first problem. So at least there is an option for user to ignore start service failure. For my second issue, is it related to user account setting, do I need "Logon as a service" to start this service even though service account is "LocalSystem", I think only difference is in installer, this service is started as "LocalSystem" Windows installer account, but if I manually start it, I use my account. I don't see any other differences.

Jimmy

PhilWilson
11-21-2005, 06:47 PM
Service startup failures in MSI always say something about having the right privileges even when it's nothing to do with that. If you take a log, are you seeing a 1920 or a 1921 error with some text about security? If it's the LocalSystem account you should be good to go as far as starting up the Service is concerned.

You might need some kind of debugging in your Service. Do you know if the Service starts at all? If it starts up but has a missing dependency you might not get far enough to catch any diagnostics. If it's silently crashing you've just got something wrong with the Service on XP/2003. Does it start if you don't configure it with your account? If your Service tries to access the network it might be crashing with security errors, but running with your account might well work (LocalSystem usually can't access network resources).

Hamilton-Scott
11-22-2005, 03:45 AM
Edit the login properties of the service and change the local system account to a name and password you know should be ok. The start the service. Repeat until you get one that works.

I had service startup failures and rollbacks until I latched onto that. I now use a custom dialog to prompt for the account name and masked edit password. I also have a checkbox for each of the seven services I install. Generally I apply the same name and password to each. For some reason some services would run ok with the local system account and one or two would not. My problem is almost the same as what you experienced so maybe this is something to consider.

jimmyliu
11-22-2005, 02:50 PM
Thanks for all kinds of help. Finally I fix the problem, my service has some dll dependency, in my XP, the error message is error 1920, no priviledge, but on Win2000, it complains can not load dll, after I add this dll, it works fine. Thanks.

Frenchy
08-22-2006, 05:02 PM
I tried the "wait for the SCM" option and still get the error with no ignore button. Also I chekced the dependencies and the PATH and they are correct. I am not sure what else to do. any ideas?