Re: Same win service with different display names and description
"Wilson, Phil" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <5C889913FF236E4190093AF280AB4EC401326D778F@wwlkfmail1.wonderware.com> |
.NET Services don't *require* installing with the InstallUtil tool, or installer classes to be more general. Visual Studio encourages them, together with setup projects that use the same installer classes. MSI can install them just fine with its built-in ServiceInstall/ServiceControl tables and whatever IDE support your tool offers (that would be every tool that can build MSI files *except* Visual Studio). I have no idea why Visual Studio invented a requirement that you need to use code to install services, outside of InstallUtil's use in a dev environment. IMO it's a step backwards compared with just specifying values in a table and letting Windows do it all for you. WiX is coming anyway as part of the next Visual Studio, to touch on what Phil Sayer said (sorry...) so maybe current setup projects with service installer classes will fade away. In general, people build MSI setups for commercial redistribution for a number of reasons, in this particular case because you wouldn't really ship a product that requires a user to do an install by running InstallUtil a number of times, and whatever else would be needed to upgrade it later, and that would also install prerequisites such as some version of the .NET framework. But yes, you are getting into an area where you need to be a setup developer rather than a .NET developer, and that can be unfamiliar work with a learning curve. A Different Phil Phil Wilson -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]] On Behalf Of Eddie Lascu Sent: Monday, November 24, 2008 7:46 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Same win service with different display names and description Phil, Windows Services developed in .NET are installed with the installutil tool. All you need to do is go: C:\>installutil yourproject.exe What you propose may work, but it also means that I need to stray away from the installutil tool and go into other tools that I don't know much about. Will investigate the other "users" list. Thanks, Eddie -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]] On Behalf Of Phil Sayers Sent: Monday, November 24, 2008 10:30 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Same win service with different display names and description This sounds like a deployment problem. I'm 95% sure that something like the WiX toolset [1] or other MSI builder would be able to help you here. It all comes down to getting your component GUIDS correct in the installer... and yes, you can specify service names/descriptions as needed, or even prompt the user for them at install time... or specify them by launching the msi from the commandline or a bootstrapper. There is also a "users" list for wix avaiilable through sourceforge. The devs of Wix are very active on the list. [1]http://wix.sf.net (open source, but from MS. tool to build installers) -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]]On Behalf Of Eddie Lascu Sent: Monday, November 24, 2008 10:17 AM To: [email protected] Subject: [ADVANCED-DOTNET] Same win service with different display names and description Hi there, I have one windows service that I need to deploy 4 times on a production server. Each service will control a different interface. The interfaces are 100% similar so that is why it made sense to develop only one service. Now, that I need to deploy them, I also need to instantiate them with different display names and descriptions. The display name and the description are properties of the serviceInstaller object. Is there a way to change those two properties other than changing them in my development environment and then recompile the whole service? Is there some kind of configuration file for the service itself where these properties would be stored and then read by the service during the installation phase? Thanks for your help, Eddie =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives