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

Set up System Environment Variable


2 replies to this topic

ljustice

ljustice
  • Members
  • 1 posts

Posted 16 January 2003 - 18:16

I am a relatively new user to InstallShield 6.5 and I am trying to establish a System Environment Variable as a part of my installation.  The OS's that will be supported are 98, NT, 2000 and XP.  What are the methods used to do this?

Please include sample code if applicable.

Thanks for the help!

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 16 January 2003 - 19:29

There's no such thing as IS 6.5--at least not that I'm aware of.  The most recent 6.x release is still 6.31.

I've never made an System Environment Variable though, I've only appended to the path, so someone else will have to answer this question.
user posted image

jverne

jverne
  • Members
  • 16 posts

Posted 16 January 2003 - 23:18

Unfortunately, the project I did this in is not available to me, so this is mostly from memory.  However, I think this is a good start :

RegDBSetKeyValueEx() can be used to manipulate the environment variable registry values for NT/2000.  You can change either the global variables or the per-user settings.

For 9x, you can use BatchAdd() or EZBatchAdd() to manipulate the startup file where env vars are set (usually autoexec.bat).  Then you use BatchFileSave() to commit your changes.

I'd start with the docs for these functions (or search on "environment" in the help index).

I ended up making some post-install functions of my own to decide how to set the vars I needed, and changed my method based on the system.