+ Reply to Thread
Results 1 to 4 of 4

Thread: Implement changes to Environment Variables

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Unregistered Guest

    Default Implement changes to Environment Variables

    Our script changes environment variables, but the changes are not seen systemwide until the user reboots.

    In other words, the set commands in SetupBuilder are working. I can see the new variables when I go to Advanced Setttings on the Computer and look at the environment variables. So, the registry has been updated.

    However, when I open a new DOS command prompt and type Set and hit enter the variables are not there.

    Is there a command in SetupBuilder (or a call I can make) that will implement the changes for all new processes? I don't want the user to have to reboot in order to use the app.

    Thanks,

    James

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Implement changes to Environment Variables

    James,

    Then installer uses the following function to propagate changes:

    SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 5000, &dwReturnValue);

    http://support.microsoft.com/default...en-us%3b104011

    Friedrich

  3. #3

    Default Re: Implement changes to Environment Variables

    Is there a command within SetupBuilder to put this timeout anywhere withing the script?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Implement changes to Environment Variables

    Hello,

    This function is automatically called from the installer.

    But it should be possible to use the "Call Dll..." script function to call this SendMessageTimeout Windows API programmatically from your script.

    Does this help?

    Friedrich

+ Reply to Thread

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
  •