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

Change Config files as per path selected


2 replies to this topic

Angelica

Angelica
  • Members
  • 8 posts

Posted 20 March 2002 - 01:36

Hi,

I browsed this Forum's entire 17pages and found it interesting and approachable.

I use IS prof. 6.2

Query 1:
Certain  .bat files in our product's components have been hard-coded to read the path as C:\Product\Component1
considerign that the end-user would install on the C:\
Well, the user surely has a choice to browse and select the location where the Product is to be installed.
Now my Ques. is:
How can I tell InstallShield to replace the hard-coded PATHS in the  .bat files  to read the path location SELECTED by the user.

Query 2:
We have 2 components which require JRE to run.
We do package JRE alongwith our product.   C:\ProductName\JRE\
But, as mentioned in my Query 1: ; if the user chooses a
different location to install our product, then all configuration files where the JRE path is referred to MUST be changed.
Now my Ques. is:
How can I tell InstallShield to pick up the path chosen by user to install the and make appropriate changes to the configuration files referring to the JRE path?

I understand that a path variable can be defined in my setup script. I seem to know the answer vaguely, and I am looking for more clear code samples and help.

Query 3:
Also, I do NOT want to force the end user to use my JRE. Instead, I want to find out if the user has a JRE available, and if so, verify which version of JRE the user has and either accept that version or send a message that the user has to install my JRE.

All said: First of all, I thank you for going thru my thread and HELP from anyone is totally appreciated as I am getting used to using this InstallShield Professional Edition 6.2.

Thanks Again,
Awaiting help,
Angelica.:-)

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 20 March 2002 - 12:11

Hi Angelica.

1) I'd say your best shot would be adjusting you .bat files to read %1\Component, so that you can specify the need path as an argument to the batchfile.

2) You can't. I had the same problem, and the solution I came up with is to read the "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\1.3\JavaHome" registry key (if you use a different version than 1.3, be sure to adjust the registry path.). This contains the path where JRE is installed to.

3) Read the registry fir the jre install path (see question 2) and check if java.exe is present at the \bin directory of that location.
To check which version is installed, look which sub-keys are present under the "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment".

HtH, Ide

Angelica

Angelica
  • Members
  • 8 posts

Posted 20 March 2002 - 23:56

Ide:

Thanks. I will try ur idea.


Angel:-)