Community Forums
Results 1 to 3 of 3

Thread: Setting system environment variables - Not working with services.

  1. #1
    Join Date
    Jun 2002
    Perth, Western Australia

    Setting system environment variables - Not working with services.

    I'm currently working on Win2k machines - using a InstallScript MSI project.

    I am setting [INSTALLDIR] into the path environment via the appropriate registry key, and then using:

    #define WM_WININICHANGE 0x001A
    #define HWND_BROADCAST 0xffff

    svEnv = "Environment";
    pEnv = &svEnv;
    SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );

    to refresh the environment.
    I've verified that this works for the explorer shell, and any apps launched from the desktop. Where it is not working though, is applications launched from the services manager - This is the problem.

    I need to be able to start my service imediately after install - without having to reboot to update the environment/path.

    Anyone have any ideas?


  2. #2
    Join Date
    Jun 2005
    Hi DG,
    Did you get to know to solution of the problem. Actually i am struggling with the same problem for more than past 10 days. I am updaing the PATH environment variable, which needs to be there on target machine prior to install some of the application related services. PATH gets updated very well but somehow services are not getting installed. I have tried using SendMessage but with no success. I want to refresh the environment variable but without reboot.

    pls. guide.

    Thanks in advance.

  3. #3
    Join Date
    Jun 2005
    added information:
    I am working on InstallShield 11.5 windows.

Posting Permissions

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