cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sandy_2008
Level 7

System variables go missing on installation

I've found a strange issue on windows 64bit machine. The default system variables gets removed automatically after installation.
Has anybody faced this issue? I'm using IA7.1.3 EE
Labels (1)
0 Kudos
(10) Replies
pv7721
Level 20

7.1.3 is a pretty old IA version, I think the 64-bit support was improved in more recent versions (there were at least 3 major versions released since 7.1.3: 8.0.x, 2008 and 2008 Value Pack 1).
0 Kudos
sandy_2008
Level 7

I bundled 32bit JRE for both 32bit and 64bit windows installers. When I install 32bit installer on windows 64bit machine, it doesn;t give me any problem.
But the following issue occurs only when I install 64bit installer on windows 64bit machine. How does it make difference?
0 Kudos
shanno
Level 3

Even I am facing the same issue. Probably we should ask InstallAnywhere to include a feature that clubs 32/64 bit setups in a single package thus a single file for both platforms as InstallAware is offering which makes things lot easier.
0 Kudos
sandy_2008
Level 7

Are you also using IA7.1.3 version? Do you get the same issue of system variables getting vanished? Do you have any clue why?
0 Kudos
sandy_2008
Level 7

Can anyone please give me any hint why this is happening.
Is it because IA7.1.3 doesn't support bundling of 64bit JRE?
or could it be because of my code?
How do I debug it?
Can I post this query to IA support directly?
Please help!!
0 Kudos
sandy_2008
Level 7

I found on net that on windows 64bit machine,there are 2 command prompts, the default is for 64bit (c:\windows\system32\cmd.exe), and another for 32bit applications (c:\windows\sysWow64\cmd.exe).
I'm bundling 32bit JRE in my windows 64bit installer, as IA7.1.3EE doesn't support bundling 64bit JRE.
Can this cause problem? Why should it affect System Environment variables?
I'm also using 'Set System Variables' action in the project.
0 Kudos
sandy_2008
Level 7

It seems nobody has clue about this issue. How can I post this question to support?
We have the build license.
0 Kudos
pv7721
Level 20

0 Kudos
sandy_2008
Level 7

I found why this was happening.. This is because with every installation we put multiple entries in PATH and CLASSPATH (Set System environment variable) and when the length of the entries in these variables exceeds the limit, it results in such a weird behaviour. There are two drawbacks in our installer:
1. It doesn't remove the entries on uninstallation (I do not know how to do this)
2. Once we put the entries of jars in CLASSPATH(lets say rt.jar) during installation, in the second installation also, the same jar name, but with different path (because the installation location will be different) is added.
and It keep on adding the entries on every installation.
0 Kudos
sandy_2008
Level 7

Actually, it sets these variables:
PRDT_ROOT=
PATH=/jre/bin;$PATH

So I guess the solution is to do this:
pre_install: Check if PRDT_ROOT exists. If yes, then find the same value in PATH. If exists, then remove that path from PATH variable and save it to a variable (NEW_PATH) which can be used during Installation.
install: Set System Environment variable (PATH) replace with NEW_PATH
Set System Environment variable (PATH) prepend with new values.
uninstall: Set System Env variable (PATH) replace with NEW_PATH.

Which Api should I use to implement the pre_install task?
0 Kudos