installing windows service with SC.exe or InstallUtil.exe – there is difference but which?

Yes, installing a service isn’t particularly complicated. It just takes writing a handful of registry keys. You can have a look-see with Regedit.exe, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services. Sc.exe can write these keys too, using the supplied command line arguments. Nevertheless, this is not the right way to do it. The point of InstallUtil.exe is that it … Read more

Install Windows Service created in Visual Studio

You need to open the Service.cs file in the designer, right click it and choose the menu-option “Add Installer”. It won’t install right out of the box… you need to create the installer class first. Some reference on service installer: How to: Add Installers to Your Service Application Quite old… but this is what I … Read more

Install a .NET windows service without InstallUtil.exe

Yes, that is fully possible (i.e. I do exactly this); you just need to reference the right dll (System.ServiceProcess.dll) and add an installer class… Here’s an example: [RunInstaller(true)] public sealed class MyServiceInstallerProcess : ServiceProcessInstaller { public MyServiceInstallerProcess() { this.Account = ServiceAccount.NetworkService; } } [RunInstaller(true)] public sealed class MyServiceInstaller : ServiceInstaller { public MyServiceInstaller() { this.Description … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)