Installutil.exe Stack Overflow when installing service. -
Question
-
Heya,
I'k writing a service in C# using Visual Studio Express, so I dont take admission to the service templates.
I have built the service successfully, merely when I get to install it using installutil.exe, it crashes with a StackOverflow.
Debug chucks out one of these: um:wrong_symbols_c00000fd_installutil.exe!unknown_error_in_process
I reckon there is probably some method in the ServiceInstaller or ServiceProcessInstaller that I need to override, but I'm having trouble working out which one.
Anyone had this consequence before?
Answers
-
Y'all are mixing up the installers in your custom installer. Yous are creating an instance of your SP installer within itself. Refer to the MSDN link as an example but here's what (I believe) you need to change.
- IBSupportServiceInstaller should derive from Installer
- Remove your custom installer types beyond IBSupportServiceInstaller
- Within IBSupportServiceInstaller create an example of ServiceProcessInstaller and 1 case of ServiceInstaller (equally fields is fine)
- Inside the installer ctor set up the various properties of each installer as appropriate (this includes setting the service name to friction match your service, etc)
- Set the service installer'due south parent to the service process installer
- Add the service process installer to the Installers collection of your custom installer
When InstallUtil runs it'll find your custom installer. It will then enumerate the Installers that your installer defines of which there is simply the SP installer. Information technology'll then enumerate the Installers of the SP installer of which merely the service installer exists. So the chain is custom installer -> SP installer -> service installer.
public class IBSSupportService : System.ServiceProcess.ServiceBase { public const string Proper noun = "IBSupportService"; public IBSSupportService () { this.ServiceName = IBSSupportService.Name; } } [RunInstaller(true)] public course IBSSupportServiceProcessInstaller : System.Configuration.Install.Installer { private ServiceInstaller serviceInstaller; individual ServiceProcessInstaller processInstaller; public IBSSupportServiceProcessInstaller () { processInstaller = new ServiceProcessInstaller() { Account = ServiceAccount.LocalSystem, }; serviceInstaller = new ServiceInstaller() { ServiceName = IBSSupportService.Name, StartType = ServiceStartMode.Automatic }; serviceInstaller.Parent = processInstaller; Installers.Add(processInstaller); } } Michael Taylor
http://msmvps.com/blogs/p3net
- Marked equally answer by Wed, July 16, 2014 9:31 PM
-
Something I did to brand my life easier when working with Visual Studio Express was build a bare Windows Service in Visual Studio Pro and I saved the projection on a flash drive. Whenever I'm stuck on a system that merely has Express and I need to create a Windows Service, I open the project in Express and go to work.
Delight mark my post as helpful or the answer or better withal.... both! :) Thanks!
- Marked every bit answer past AussieKlutz Wednesday, July 16, 2014 9:32 PM

How To Install Service Using Installutil Exe,
Source: https://social.msdn.microsoft.com/Forums/en-US/387af6f2-2f4f-4b20-9398-34a9c4b32724/installutilexe-stack-overflow-when-installing-service
Posted by: bownecontable85.blogspot.com
0 Response to "How To Install Service Using Installutil Exe"
Post a Comment