Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Multiple Custom Action Install Steps
semljola
#1 Posted : Wednesday, November 19, 2008 6:37:59 AM(UTC)
Groups: Member
Joined: 11/19/2008(UTC)
Posts: 1
Location: sweden

Is there a way of installing more than one application/ webservice at the time in Custom install steps? Would it work with the same AppID for all installed instances (for Rollback Uninstall) purposes?

Adding UltiDevCassiniServerConfiguration.dll more than once under "Install" works initially, but this may not be very correct?

One:
/AppID="{BCDD988F-24DA-4301-B4AD-E35BF0B63636}" /AppLocation="[TARGETDIR]\App1" /AppName="App1" /AppDefaultDoc="ProxyWebService.asmx"

Two:
/AppID="{BCDD988F-24DA-4301-B4AD-E35BF0B63636}" /AppLocation="[TARGETDIR]\App2" /AppName="App2" /AppDefaultDoc="Default.aspx"
Ultidev Team
#2 Posted : Wednesday, November 19, 2008 10:15:45 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Using multiple instances of Install or any other custom action is perfectly legitimate. You can use it if you wish.

This approach may have one undesirable effect on slow machines though. Every time you do registration this way, Cassini Metabase (configuration file) is being updated. When the file gets updated, Cassini service reloads all applications. This may lead to two "reloads" in the row, and on some machines that sometimes leads to failure to re-bind recently freed TCP port - so there is a reason to do it in one step instead of two.

If you prefer to registers/unregister multiple applications in one take, the way to do it is to create your own installer class (you may need to create an assembly for that) that will act as a custom actions implementation. Your installer class would too use UltiDevCassiniServerConfiguration.dll functionality, but instead of invoking it as a custom installer, you would call it directly, as an API. You would need to add UltiDevCassiniServerConfiguration.dll as a Reference to your project. When implementing Install step, you would create two instaces of ApplicationEntry class, set their properties, like application ID, URL, etc. After that you would use RegisterApplication() method like this:
Code:
Metabase cassiniMetabase = Metabase.Load();
cassiniMetabase.RegisterApplication(appEntry1);
cassiniMetabase.RegisterApplication(appEntry2);
cassiniMetabase.Save();

This will accomplish registering multiple application followed by a single applications re-load.
Your Rollback and Uninstall steps would look very similar to that, with the exception that they will use UnregisterApplication() method:
Code:
Metabase cassiniMetabase = Metabase.Load();
cassiniMetabase.UnregisterApplication(appId1);
cassiniMetabase.UnregisterApplication(appId2);
cassiniMetabase.Save();

Then you would use the assembly with your own installer class as a custom actions target.

Please let us know if you have any questions.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.