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

Repairing Environment Variable


7 replies to this topic

clareb22

clareb22
  • Members
  • 20 posts

Posted 18 February 2002 - 17:42

When I have installed a product in a custom directory (not the default installdir specified in the installshield project.  When I remove the environment variable the installation adds, if I repair the install, the environment variable is added back to the system, however the path of the variable [installdir] defaults to the path stated in the installshield project and not the custom directory the installation installed to.  Is this a bug, or am I doing something wrong?  Has anybody else spotted this problem?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 February 2002 - 19:37

Which version of InstallShield are you using?
Do you have a least one component that's being installed to INSTALLDIR (not a sub dirctory thereof)?

clareb22

clareb22
  • Members
  • 20 posts

Posted 19 February 2002 - 10:15

I'm using Installshield Windows Installer Edition 2.03.  I've had a look and all the components have INSTALLDIR with following subdirectories.  Does it matter if features only pointed to INSTALLDIR?

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 19 February 2002 - 15:22

Clare when you create the environment value derive your value from a component not a directory. ie you use [INSTALLDIR] but it might be better to use [$component] where 'component' is a name of a suitable component.


clareb22

clareb22
  • Members
  • 20 posts

Posted 25 February 2002 - 17:17

This seems to have fixed my problem.  Thank you

clareb22

clareb22
  • Members
  • 20 posts

Posted 26 February 2002 - 12:46

Has anyone noticed any strange happenings when using [$component] for when installing into the default INSTALLDIR directory and not a custom directory?

E.g. if using a merge module with an environment variable in it using this method, with the INSTALLDIR set to . and when installing environmental variable it doesn't update the path properly?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 February 2002 - 10:50

Check the component ID of the built MSM file. It will probably have the module GUID appended to its name.

clareb22

clareb22
  • Members
  • 20 posts

Posted 01 March 2002 - 09:27

Another problem I have discovered when using this method is when using these settings, when  uninstalled it
removes the entire PATH, even if the path had settings in it prior to the
installation.  The reason is because on uninstall, the value is being
resolved to NULL and when the value is NULL, installshield removes the
environment variable it is trying to update.

Can anyone tell me a way of fixing this problem?