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

Editing system PATH variable


1 reply to this topic

jmbutler

jmbutler
  • Members
  • 3 posts

Posted 21 January 2002 - 22:57

I'm still amazed that such a robust installer IDE doesn't have a good way to add things to the system path, but here goes ... the Environment table in the Power Editor makes it easy to just append a new path, but it will continue to do it over and over if the package is reinstalled.  I need to have some logic involved.  Someone tell me if the following custom action steps might work:

1.  Set the Environment table in Power Editor to use a property to set the value of *PATH
2.  Use GetEnvVar() to get the current PATH value
3.  Use the StrFind() to see if what I need to add is already there
4.  Append the path to the string if necessary
5.  Set the property in step 1 to the new string value using MsiSetProperty().

Since the property's value is what the path variable should be, it should use that value in the Environment table, right?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 January 2002 - 15:21

I would expect that Windows Installer runtime will not add multiple instances of the same entry to the PATH.
BTW in Installshield Developer 7 there's an Environment Variables view so you don't have to use the environment table