Custom Action for service install

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom Action for service install

Ana Buigues Grimalt
I'm writing an installer that needs to install a Windows service.

I had created a vdproj to install it, but it's a bit limited (and not directly callable from NAnt) so I'm moving it to use the <msi> task. I have everything set up and working except installing and un-installing the service.  The question is how should I do this? 

Cheers,

Ana

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

_______________________________________________
NAnt-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Action for service install

William_Martin

Hi Ana,

 

It’s a long time since I’ve done this, and I haven’t got any examples handy unfortunately, but what you basically need to do is write a custom action to call the installer class in the assembly.  The simple cheat for this is to create your MSI using the vdproj project, then open the generated msi with orca and see the custom actions created.  There should be 4 custom actions in total for a service – a type 1025 and a type 51 for install and the same for uninstall.  You can use the <customaction> element in the msi task schema to generate the correct entries in the custom actions table of your msi file.  You will also need to add entries to the sequence table to execute the action.  I seem to remember these need to be post install actions as the service’s assembly isn’t on the disk until after the commit.

 

The other “gotcha” if I remember correctly is that you need to use the forceid option on the components and provide hard coded GUIDs to prevent the msi task generating random ones as you need these for the custom actions and you can’t get hold of the auto-generated ones.

 

The other (slightly more involved) option is to use the ServiceControl and ServiceInstall tables and write the entries directly without using the Installer class in .NET.  Unfortunately, these tables are not part of schema that ships with the <msi> task, so you would have to sue the <tables> element to define them yourself.  It does, however, give you more control, especially over starting and stopping services on install and uninstall.

 

HTH,

Bill

 

 


From: [hidden email] [mailto:[hidden email]]
Sent: 15 December 2009 08:11
To: [hidden email]
Subject: [NAnt-users] Custom Action for service install

 

I'm writing an installer that needs to install a Windows service.

I had created a vdproj to install it, but it's a bit limited (and not directly callable from NAnt) so I'm moving it to use the <msi> task. I have everything set up and working except installing and un-installing the service.  The question is how should I do this? 

Cheers,

Ana

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England.
Registered Office: Tiddington Road, Stratford-upon-Avon, Warwickshire CV37 7BJ.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.
For security and training purposes telephone calls may be recorded and monitored.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

_______________________________________________
NAnt-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Action for service install

Ana Buigues Grimalt
Thanks for your response. Its just that I need.

But now, I don't find the sources

                <binary name="MSVBDPCADLL" value="MSVBDPCADLL.dll" />   
                <binary name="VSDNETCFG" value="VSDNETCFG.dll" />   

Where can I find the dlls?

Thanks for advance.

Ana


2009/12/15 <[hidden email]>

Hi Ana,

 

It’s a long time since I’ve done this, and I haven’t got any examples handy unfortunately, but what you basically need to do is write a custom action to call the installer class in the assembly.  The simple cheat for this is to create your MSI using the vdproj project, then open the generated msi with orca and see the custom actions created.  There should be 4 custom actions in total for a service – a type 1025 and a type 51 for install and the same for uninstall.  You can use the <customaction> element in the msi task schema to generate the correct entries in the custom actions table of your msi file.  You will also need to add entries to the sequence table to execute the action.  I seem to remember these need to be post install actions as the service’s assembly isn’t on the disk until after the commit.

 

The other “gotcha” if I remember correctly is that you need to use the forceid option on the components and provide hard coded GUIDs to prevent the msi task generating random ones as you need these for the custom actions and you can’t get hold of the auto-generated ones.

 

The other (slightly more involved) option is to use the ServiceControl and ServiceInstall tables and write the entries directly without using the Installer class in .NET.  Unfortunately, these tables are not part of schema that ships with the <msi> task, so you would have to sue the <tables> element to define them yourself.  It does, however, give you more control, especially over starting and stopping services on install and uninstall.

 

HTH,

Bill

 

 


From: [hidden email] [mailto:[hidden email]]
Sent: 15 December 2009 08:11
To: [hidden email]
Subject: [NAnt-users] Custom Action for service install

 

I'm writing an installer that needs to install a Windows service.

I had created a vdproj to install it, but it's a bit limited (and not directly callable from NAnt) so I'm moving it to use the <msi> task. I have everything set up and working except installing and un-installing the service.  The question is how should I do this? 

Cheers,

Ana

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England.
Registered Office: Tiddington Road, Stratford-upon-Avon, Warwickshire CV37 7BJ.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.
For security and training purposes telephone calls may be recorded and monitored.


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

_______________________________________________
NAnt-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Action for service install

William_Martin
In reply to this post by Ana Buigues Grimalt

Hi Ana,

 

I found a file after I emailed you, and I have these entries in the <binaries> block:

 

                <!-- Install support file.  Includes methods to check Framework verison etc. -->

                <binary name="MSVBDPCADLL" value="references/external/Microsoft/dpca.dll" />

                <!-- config file for InstallUtilLib -->

                <binary name="VSDNETCFG" value="references/external/Microsoft/dpapp.config" />

 

The files referenced are installed with Visual Studio in the Common7\Tools\Deployment folder

 

Cheers,

Bill

 


From: [hidden email] [mailto:[hidden email]]
Sent: 15 December 2009 12:11
To: Bill Martin
Cc: [hidden email]
Subject: Re: [NAnt-users] Custom Action for service install

 

Thanks for your response. Its just that I need.

But now, I don't find the sources

                <binary name="MSVBDPCADLL" value="MSVBDPCADLL.dll" />   
                <binary name="VSDNETCFG" value="VSDNETCFG.dll" />   

Where can I find the dlls?

Thanks for advance.

Ana

2009/12/15 <[hidden email]>

Hi Ana,

 

It’s a long time since I’ve done this, and I haven’t got any examples handy unfortunately, but what you basically need to do is write a custom action to call the installer class in the assembly.  The simple cheat for this is to create your MSI using the vdproj project, then open the generated msi with orca and see the custom actions created.  There should be 4 custom actions in total for a service – a type 1025 and a type 51 for install and the same for uninstall.  You can use the <customaction> element in the msi task schema to generate the correct entries in the custom actions table of your msi file.  You will also need to add entries to the sequence table to execute the action.  I seem to remember these need to be post install actions as the service’s assembly isn’t on the disk until after the commit.

 

The other “gotcha” if I remember correctly is that you need to use the forceid option on the components and provide hard coded GUIDs to prevent the msi task generating random ones as you need these for the custom actions and you can’t get hold of the auto-generated ones.

 

The other (slightly more involved) option is to use the ServiceControl and ServiceInstall tables and write the entries directly without using the Installer class in .NET.  Unfortunately, these tables are not part of schema that ships with the <msi> task, so you would have to sue the <tables> element to define them yourself.  It does, however, give you more control, especially over starting and stopping services on install and uninstall.

 

HTH,

Bill

 

 


From: [hidden email] [mailto:[hidden email]]
Sent: 15 December 2009 08:11
To: [hidden email]
Subject: [NAnt-users] Custom Action for service install

 

I'm writing an installer that needs to install a Windows service.

I had created a vdproj to install it, but it's a bit limited (and not directly callable from NAnt) so I'm moving it to use the <msi> task. I have everything set up and working except installing and un-installing the service.  The question is how should I do this? 

Cheers,

Ana

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.

Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.

Avon Insurance plc (No. 209606).

Registered in England.
Registered Office: Tiddington Road, Stratford-upon-Avon, Warwickshire CV37 7BJ.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.
For security and training purposes telephone calls may be recorded and monitored.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England.
Registered Office: Tiddington Road, Stratford-upon-Avon, Warwickshire CV37 7BJ.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.
For security and training purposes telephone calls may be recorded and monitored.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

_______________________________________________
NAnt-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Action for service install

diemei
This post has NOT been accepted by the mailing list yet.
In reply to this post by Ana Buigues Grimalt
Converse offers a avant-garde abuttals of admirable sneakers that babyish to men, women and accouchement alike. And their ultra-sleek eyewear bandage is not to be taken lightly. So, whether you're analytic for a brace of old-school Chucks (Chuck Taylor All Star) or high-end models such as Jack Purcell or converse unisex chuck taylor slim leather hi lace up by John Varvatos, accessory no added than Converse!For latest adverse shoes or acclimation air force ones? Welcome to china-bness.com, the destination for acclimation sports shoes.
Loading...