System path
My installer modifies the system path. It adds two directories to the system path. For Windows 9x machines it updates autoexec.bat. For Windows NT based machines it modifies HKLM\System\CurrentControlSet\Control\Session Manager\Environment\. After the system path has been updated, then I register an ocx file.
My ocx file has dependencies in the two directories I just added to the system path. The problem I am having is that I need the path updated before the installer exits because I need to register that ocx file. After adding these two directories to the system path, I do this:
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
I figured that this would refresh the system path for all running processes. This doesn't seem to be the case however. When I test my installer, I see that the path gets updated before the installer quits but the ocx file still fails to register. When the installer exits, I relaunch it and try installing again. The second time always works because I think the system path info is updated.
Is there any truth to this?