There is one big gotcha when comparing the ServiceInstaller class in .NET 
with ServiceInstall in WiX.  The ServiceInstaller actually does two things:
 - Creates the Windows service in the Service Control Manager (SCM)
 - Creates an event source associated with the application event log for the 
service to write messages to

As such, ServiceInstall only takes care of 1/2 of the required tasks.  To 
create the event source, you could either use the new support for that in 
WiX 3 that Bob added last year or just write the appropriate registry 
entries manually using <Registry>.

However, it is totally possible to install a Windows service implemented in 
.NET using ServiceInstall.  There is nothing particularly fancy that the 
ServiceInstaller class does that ServiceInstall doesn't do from the actual 
SCM perspective.

If there are any installer classes defined in the assemblies that get 
installed with the service, those basically just would not get used in the 
WiX-based deployment.  As many of us have been suggesting, that is a good 
thing, as those are best avoided when there are better alternatives.  :)

I hope that's helpful.

Joe K.

----- Original Message ----- 
From: "John Vottero" <[EMAIL PROTECTED]>
To: <wix-users@lists.sourceforge.net>
Sent: Friday, April 06, 2007 3:02 PM
Subject: Re: [WiX-users] Installing .NET Services


I would use the WiX <ServiceInstall>.  It's easier and more reliable
than trying to call the Installer class.  You can leave the Installer
based class in the code if you want.



From: Don Tasanasanta [mailto:[EMAIL PROTECTED]
Sent: Friday, April 06, 2007 3:00 PM
To: John Vottero; Kevin Burton; Rob Mensching; BULL, Dave, GBM;
wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Installing .NET Services



So what is the correct way to handle situations like this?



Let's say there's a .net service that needs installing but has Installer
based classes. How should the install handle this?



________________________________

From: John Vottero [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 9:57 AM
To: Kevin Burton; Don Tasanasanta; Rob Mensching; BULL, Dave, GBM;
wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Installing .NET Services



Correct.  Neither WiX's <ServiceInstall> nor SC CREATE need or use the
Installer class.  But, they can both install .NET based services whether
the service has an Installer based class or not.



From: Kevin Burton [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 12:54 PM
To: John Vottero; 'Don Tasanasanta'; 'Rob Mensching'; 'BULL, Dave, GBM';
wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] Installing .NET Services



The problem is that none if the "Installer" methods or events are
getting called. With InstallUtil the methods and events associated with
the Installer base class are call. With <ServiceInstall> they are not. I
would assume that SC_CREATE would also not call the Installer base class
methods.



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Vottero
Sent: Thursday, April 05, 2007 11:41 AM
To: Don Tasanasanta; Rob Mensching; BULL, Dave, GBM;
wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Installing .NET Services



I don't think there's a difference between installing a .NET service vs
. a "regular" service so, ServiceInstall doesn't need to detect
anything.  Can you install your service with SC CREATE?



The InstallUtil.exe doesn't know a service from a hole in the ground.
All it does is look for classes that have the RunInstaller attribute and
it calls the right methods (depending on the command line switches).



Was your service already installed the first time that you tried to
install it via WiX?  I'm not sure what Windows Installer does if a
service is already installed when it thinks it's installing for the
first time.



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Don
Tasanasanta
Sent: Thursday, April 05, 2007 12:28 PM
To: Rob Mensching; BULL, Dave, GBM; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Installing .NET Services



How does ServiceInstall detect that you're installing a .net service as
opposed to a "regular" service?



I'm experiencing difficulties installing a .net service using
ServiceInstall. The service is there but doesn't seem to be registering
properly.



How does ServiceInstall work compared to the .net utility
InstallUtil.exe?



________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob
Mensching
Sent: Wednesday, October 25, 2006 8:12 AM
To: BULL, Dave, GBM; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Installing .NET Services



ServiceInstall should just work.



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of BULL,
Dave, GBM
Sent: Wednesday, October 25, 2006 5:52 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Installing .NET Services



Hi Wix people



I am having problems installing a windows service written in .NET. I am
using wix 3.0.2128.0.



I have successfully managed to install services written in unmanaged C++
using the ServiceInstall tag, but this doesn't seem to work for my .NET
component.



Do I have to use the method which is mentioned here:



http://installneo.blogspot.com/2004/09/installing-windows-services-creat
ed.html



? ... or should the ServiceInstall tag work?



Dave



************************************************************************
***********

The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.

Authorised and regulated by the Financial Services Authority



This e-mail message is confidential and for use by the

addressee only. If the message is received by anyone other

than the addressee, please return the message to the sender

by replying to it and then delete the message from your

computer. Internet e-mails are not necessarily secure. The

Royal Bank of Scotland plc does not accept responsibility for

changes made to this message after it was sent.



Whilst all reasonable care has been taken to avoid the

transmission of viruses, it is the responsibility of the recipient to

ensure that the onward transmission, opening or use of this

message and any attachments will not adversely affect its

systems or data. No responsibility is accepted by The

Royal Bank of Scotland plc in this regard and the recipient should carry


out such virus and other checks as it considers appropriate.

Visit our websites at:

http://www.rbos.com

http://www.rbsmarkets.com

************************************************************************
***********




--------------------------------------------------------------------------------


> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


--------------------------------------------------------------------------------


> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to