Results 1 to 3 of 3

Thread: Environment Variable question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Environment Variable question

    Hi Kurt,

    In Windows, modifications to the environment variables do not result in immediate change. For example, by default, if you start a Command Prompt after making the changes, the environment variables will reflect the previous (not the current!) values. The changes do not take effect until you log off and then log back on.

    To effect these changes without having to log off, SetupBuilder broadcasts a WM_SETTINGCHANGE message to all windows in the system, so that any interested applications can perform an update. But if an application does not handle this message, the environment variables will still reflect the previous (not the current) values.

    That is by Windows design and expected. I have created an example (please see the attached screenshots): the Command Prompt on Windows 10 (BEFORE.PNG) shows the environment variable "Path". We run a SetupBuilder installer to append "C:\yada" to the PATH variable. We display a simple Message Box so the installer does not continue. When we do again a SET in the same Command Prompt session, then PATH still has its "old" value. But when we start a new command prompt and do a SET, then you'll see the new value (AFTER.PNG).

    Does this help?

    Friedrich
    Attached Images Attached Images    

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •