This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Service won't start until after reboot when running under Local System Account
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
10:41 AM
Service won't start until after reboot when running under Local System Account
I am trying to eliminate a forced reboot from one of our installers.
This particular installer installs a service and we put up a dialog where the user may enter a username/password and domain to log into and run this service. If the user chooses to enter this information with good credentials the installer does not need to reboot at all and the service will run just fine.
However, if the user chooses not to enter un/pw and domain we warn the user and then cause the service to log in and run under the 'Local System Account'.
At the end of the installation when we attempt to log into the service we will throw an error because the start up of the service fails. Prior to rebooting I go to services and try to start up the service manually and get the following error message:
"The "______" service on Local Computer started then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."
Now if I reboot the machine the Local System account can log in and run the service successfully. (No Errors)
So I know providing a valid UN/PW and Domain will get the service up and running without reboot but the LocalSystem user will not.
I would appreciate any help with this. Thanks in advance.
This particular installer installs a service and we put up a dialog where the user may enter a username/password and domain to log into and run this service. If the user chooses to enter this information with good credentials the installer does not need to reboot at all and the service will run just fine.
However, if the user chooses not to enter un/pw and domain we warn the user and then cause the service to log in and run under the 'Local System Account'.
At the end of the installation when we attempt to log into the service we will throw an error because the start up of the service fails. Prior to rebooting I go to services and try to start up the service manually and get the following error message:
"The "______" service on Local Computer started then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."
Now if I reboot the machine the Local System account can log in and run the service successfully. (No Errors)
So I know providing a valid UN/PW and Domain will get the service up and running without reboot but the LocalSystem user will not.
I would appreciate any help with this. Thanks in advance.
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
11:13 AM
Got a couple of questions for you:
1) What installation project are you using?
2) How are you adding the service to the system? ServiceAddService?
3) How are you starting the service? ServiceStartService?
1) What installation project are you using?
2) How are you adding the service to the system? ServiceAddService?
3) How are you starting the service? ServiceStartService?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
12:49 PM
Sorry should have mentioned it was an InstallScript project.
The Service is added and started outside of InstallShield by two C++ functions. I am not sure why ServiceStartService and ServiceAddService were not used. This installer has been around for years. I took it over about a year ago. Originally it needed to support 95 and 98 so maybe that is why it was handled this way. Do you think the problem I am seeing would go away if I used the two functions you refer to?
The Service is added and started outside of InstallShield by two C++ functions. I am not sure why ServiceStartService and ServiceAddService were not used. This installer has been around for years. I took it over about a year ago. Originally it needed to support 95 and 98 so maybe that is why it was handled this way. Do you think the problem I am seeing would go away if I used the two functions you refer to?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
01:43 PM
I understand. I too used a C++ DLL to do exactly the same thing. I abandoned the DLL in favor of the ServiceAddService Functions. Install Shield (IS) has evolved greatly since the 95 and 98 days. Anyway, who is using 95 and 98 these days??? Aren't those two operating systems no longer supported by Microsoft???
I do recommend using the new functions from IS. I don't know if your problem will go away, but it wouldn't hurt to try them. The functions are extremely simple to use.
I do recommend using the new functions from IS. I don't know if your problem will go away, but it wouldn't hurt to try them. The functions are extremely simple to use.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
02:14 PM
Yeah the 95 or 98 was needed way back when....which we haven't supported in a long time, but there was never a reason to change the way we were adding or starting a service so here we are.
Thanks for your help, I will give the functions you mentioned a shot.
Thanks for your help, I will give the functions you mentioned a shot.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 06, 2008
05:01 PM
Please let me know what happens. If you need sample code, I'm willing to provide...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 08, 2008
12:38 PM
Did you ever resolve this? I'm having this issue, but only on XP. On 2003 the service starts fine without a reboot.
I'm quite certain the service is being installed correctly, but just for completeness sake, it is a .NET service that depends on the GAC and is therefore added and started in a custom action after InstallFinalize.
I'm quite certain the service is being installed correctly, but just for completeness sake, it is a .NET service that depends on the GAC and is therefore added and started in a custom action after InstallFinalize.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 08, 2008
12:51 PM
I was not able to resolve this though I did improve how the installer was handling the issue.
If the user passed in a good UN/PW and Domain the installer no longer reboots.
If the user does not enter a good UN/PW and Domain the "LocalSystem" user logs in by default. When the installer sees LocalSystem is the logged in user it forces a reboot at the end of the install.
More often than not our customers do not use LocalSystem. So I have greatly reduced the number of reboot but not eliminated them.
If the user passed in a good UN/PW and Domain the installer no longer reboots.
If the user does not enter a good UN/PW and Domain the "LocalSystem" user logs in by default. When the installer sees LocalSystem is the logged in user it forces a reboot at the end of the install.
More often than not our customers do not use LocalSystem. So I have greatly reduced the number of reboot but not eliminated them.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)