Selective Install - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

joaomeisen
Posts: 4
Joined: Thu Aug 06, 2009 8:58 pm
Location: USA

Selective Install

Hi all,

I have a program that comes in two parts:
a. A windows service
b. An assembly

I need for the user to be able to choose to install either or both.
I have installed both successfully but I can't figure out how to make the setup install only one or the other.
Is this possible?
Any ideas would be greatly appreciated!
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Selective Install

Hi,

You can organize your program in two features, from the Organization page:
-- the windows service , first feature
-- the assembly, second feature

Now, you can go to Dialogs page and add the SetupTypeDlg in the First Time Install tree. To add it just right click on First Time Install folder → Add Dialog and select the one required.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
joaomeisen
Posts: 4
Joined: Thu Aug 06, 2009 8:58 pm
Location: USA

Re: Selective Install

Bogdan wrote: You can organize your program in two features, from the Organization page:
-- the windows service , first feature
-- the assembly, second feature
Thank you for the reply!

It works. I just had to add is as a service too.

Now another problem has come up. When uninstalling the service does not get removed.
If I rename it in the project, it gets renamed after installation. But after uninstall it is still listed as an active service by the computer manager.
I think this may just be a property that I am overlooking but...
Ideas anyone?

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Selective Install

Hello,

I am sorry but i am unable to reproduce this behavior. The problem may be caused by the fact that your service does not stop correctly.

To test if this is the case, simply use the "services.msc" Service utility to Stop your installed service. If it stops correctly please send us your .aip project file and an uninstall log to support at advancedinstaller dot com.

Please make sure that on the Services page->Control Operations your service has the "Stop" and "Delete" checkboxes checked under the "Event On Uninstall" group.


Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
joaomeisen
Posts: 4
Joined: Thu Aug 06, 2009 8:58 pm
Location: USA

Re: Selective Install

So I am not installing the service correctly, although it was listed by the computer manager under services.
After installing I tried to run the service and got the following message:
"Error 1083: The executable program that this service is configured to run in does not implement the service."

So now my problem is how to install a service.
What is the equivalent in advanced installer to adding a project's output to a setup project?
And lastly what is the equivalent to adding this primary output as a custom action for install, uninstall, commit, and rollback?

Thanks a million
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Selective Install

Hi,
So now my problem is how to install a service.
Here is a tutorial that can help you.
What is the equivalent in advanced installer to adding a project's output to a setup project?
And lastly what is the equivalent to adding this primary output as a custom action for install, uninstall, commit, and rollback?
I'm not sure I understand what you mean. Can you please give me more details?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
joaomeisen
Posts: 4
Joined: Thu Aug 06, 2009 8:58 pm
Location: USA

Re: Selective Install

Bogdan wrote: I'm not sure I understand what you mean. Can you please give me more details?
Sure!
When creating a setup project for a service in Visual Studio you have to do the following:
- Add the output of your 'service.exe' to the setup project;
- Add this now called 'primary output from service.exe' to the custom actions; This will automatically add the primary output to all the levels of custom actions (install, uninstall, rollback, commit)

I was thinking I might've missed adding the primary output to the advanced installer project, thereby causing the service to not install although an instance of it had been created in the services list.

Anyway. I've got it working now!
Thank you very much for the help!
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Selective Install

Hi,

You can try the following solution:
-- remove the service from the Services page if already exists there
-- go to the Custom Actions page
-- add on each phase(Uninstall, Rollback,Install, Commit) a predefined custom action called “.Net Installer Class Action” and select your service

If the problem still persists please let us now.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”