Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Install 3rd party products & continue my install accordingly


13 replies to this topic

kris

kris
  • Members
  • 77 posts

Posted 22 August 2001 - 17:01

This is a big problem for me.  My install will do the following.......check to see if a user has installed three 3rd party products...if not, my install will kick off those installs.  Well, I want to be able to do the "AppSearch" and "WriteEnvironmentVariables" actions after these products have been installed, so I will have their correct installation directory paths for my environment varaibles, InstallScript, etc.  So, the dilema is this:

As it is now, 2 of the product installs I will kick off (if need be) are located after "InstallFinalize" in the Execute Sequence.  The third product install occurs in the UI sequence  (because it is a CA to launch an .msi, which needs to be done in the UI sequence).  An AppSearch exists at the beginning of the UI sequence (which I need so I can determine if the 3 products are already installed)  and then again at the beginning of the Execute Sequence.  I cannot insert another AppSearch after my .msi is launched in the UI sequence, since it already has been inserted in this sequence.   So, I thought about inserting my custom actions before the "AppSearch" in the Execute sequence, but I can't do this because my actions would need to be "deferred" CA's, since they would exist between "Install Inititialize" and "Install Finalize".

I currently force the user to install these 3 products into their default directories, and then am able to semi-hard code these install directory paths when I need them.  But, this is unacceptable.  I want my users to be able to install all 3 of the products wherever they like, and then have the ability to read this information from the tables.

I know that my install isn't exactly "simple", but this seems like a common thing to me.....there must be a way to do this, right?  I have tried and tried and tried, dozens of different ways....what am I missing?


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 22 August 2001 - 17:31

So, I thought about inserting my custom actions before the "AppSearch" in the Execute sequence, but I can't do this because my actions would need to be "deferred" CA's, since they would exist between "Install Inititialize" and "Install Finalize".

1.  They should be deferred with corresponfding roll back actions or comit actions.

2.  The AppSearch can be (and normally is) before InstallInitialize.

(Edited by Ian Blake at 5:35 pm on Aug. 22, 2001)


kris

kris
  • Members
  • 77 posts

Posted 28 August 2001 - 16:03

Yes, my AppSearch is before InstallInitialize.   But if I insert my custom actions before AppSearch, this doesn't work because I have not yet copied the files I need to run through my CA.  So, it can't find the files the CA is looking for......

My Goal:

Create an install to do the following:

Check for the existing installation of 3 products.  (which requires AppSearch to run)  Run my installs (two are Launch executable CA's with  immediate execution---which need to be in the sequence after InstallFinalize or they don't work, one is a launch another .msi package---which needs to be in the UI sequence)  Then Run AppSearch again (after the 3rd CA is run) and run WriteEnvironmentStrings.  But....I can't run AppSearch again after the 3rd CA b/c AppSearch already exists in the UI sequence......

So now it looks like the following, in the non-working form:  

UI:    
***AppSeach
...(standard actions and dialogs)
***ExecuteAction
***Launch .msi install
----------------------------->(I want to put AppSearch here but can't ..it already exists in this sequence!)
----------------------------->(If I COULD stick AppSearch here, I would want to stick WriteEnvironmentStrings here, but I can't get that to work in the UI sequence, probably b/c WriteEnvironmentStrings needs to be inserted BEFORE InstallFinalize)

Execute:
***AppSearch
....(standard actions to install my product)
***InstallFinalize
***Launch .exe1 install
***Launch .exe2 install

How can I make this possible to do?

I MUST be missing something!!  


kris

kris
  • Members
  • 77 posts

Posted 04 September 2001 - 18:37

Okay....being a newbie and not experienced (math major!  yes, I am trying to defend myself!!!!!)   I wasn't aware that you can write environment variables to the registry...once I do this my funky configuration/installation can be worked so that one of the last things I do is write Environment variables to the registry using RegDBSet/CreateKey.  This works perfectly....UNTIL I try to run a couple of configurating .bat files which depend on some of these newly created/edited environment var's.  I try calling SendMessage right after I set the environment variables...SendMessage makes a call to the Windows API to let applications know there has been an environment change, as I learned in this forum in another post... but this doesn't do it.  My bat files do not successfully complete their tasks.  I need to get something like SendMessage to work so that when my .bat files are run, they can use these environment variables..........anyone have any ideas?

thanks!


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 05 September 2001 - 08:56

I suggest you take a step back.

Do not attempt to install interdependent 3rd party installations with your main msi. You are tying yourself in knots.   When you go deeper into your install to provide upgrades etc. you start getting increasingly complicated problems to solve.

Write another script/program to launch the installs for each product individually.

In the install program of your product you should create  Type 19 Custom actions that will complain if the required 3rd party products are missing and place these just after AppSearch with suitable conditions in both user and execute sequences.  This wil insure the needed 3rd party stuff is available before your main installation starts.

Your launching script/program need not be completely automatic.  It may be better to create a nice graphical front end with buttons to install each 3rd party product. then finally yours.

Good luck.

(Edited by Ian Blake at 9:00 am on Sep. 5, 2001)


kris

kris
  • Members
  • 77 posts

Posted 05 September 2001 - 19:27

Thanks, is there a way to run the setups from the cd?

I know I can create a CA to Launch an Executable from the Binary Table...but the binary table only holds hard-coded paths...not sure how to enter a generic path within the binary table to point to the CD drive?

kris


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 06 September 2001 - 09:40

You can use
CA Type 50 - run from property value
or
CA Type 34 - run from directory table.

There is a property called SourceDir which you may be useful (after ResolveSource has been run).


kris

kris
  • Members
  • 77 posts

Posted 10 September 2001 - 14:43

I agree, Ian, that I should not try running other installs from the depths of mine.  But, instead of creating Type 19 CA's, I created 3 CA's that occur just before the "ExecuteAction" all in the UI sequence.  (I don't want type 19 actions because It is required that if the 3 other products aren't installed, I install them for the user---it has been decided by powers above me that alerting the user that they need to install the other 3 products and then aborting our setup is not acceptable).  So, my 3 CA's run from the cd now, which is great.  Then when it enters the Execute Sequence, it does another AppSearch, which should now find my installation paths (the way I have AppSearch set up).....but the second AppSearch (this one in the Execute Sequence) does not appear to be working.  

Any ideas why?   Is there anything that should be set somewhere to activate standard actions to run even if they have already been run? (So, what if AppSearch is an action which does not have the "Always Execute" selected?)  I'm getting down to the wire and getting concerned I will not be able to find a solution....  


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 10 September 2001 - 15:26

The AppSearch action is only run once per installation.  If it is run on the client side it will not run on the server side.

Fundamentally AppSearch will never need to be run again if it was run in the user sequence.   You are not supposed to make any changes to the target machine in the User sequence so if your program adheres to best practice the result of AppSearch is unchanged.


kris

kris
  • Members
  • 77 posts

Posted 10 September 2001 - 15:47

So, would it be reasonable to create an installation that simply runs the installation of the 3 products if the target machine needs them, with no dialogs, etc...just run the 3 installs if need be........then, inside THIS project, create a CA to Launch an .msi...this .msi being my installation?  

thanks for your help, by the way!!


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 10 September 2001 - 15:58

That seems a resonable way to procede.


kris

kris
  • Members
  • 77 posts

Posted 10 September 2001 - 21:38

okay, I am going to try this, although I am not sure it will be a success...see, my main reason for all of this is the following:

At the end of my installation, I want to run some batch files which depend on environment variables that I have set during the installation.........these variables are not "known" to the system until the install has completed and exited.  I previously had tried using a "SendMessage" windows API call, which did me no good.....So, I am going to try to create a project that will contain and launch my original .msi, that sets env varaibles, etc......but, since they are set still inside the installation, won't I STILL not be able to access these values until the containing instalation is comepleted?

It would be useful for me if there was a way to run a batch file after the installation had been completed, without the user having to do so........

I'm driving myself nutty thrying to accomplish this!  ; )


kris

kris
  • Members
  • 77 posts

Posted 12 September 2001 - 14:32

Well, Ian, I tried it...no success....thanks for the idea, though.....I think it did not work because the install, although it ran the second .msi separately, was still running when the env. variables were changed.

Doing it this way also produces another entry into the Add/Remove programs application, becuase I basically installed 2 products, even though one of the installs only installed the 3rd party products.

All I need is to get my .bat files to have knowledge of the newly set environment variables, then my install with be functional......any other ideas?  

(is there a way to run a file after install has completed...like you would run a Readme file after install completion?)