Archive: execwait not aware of path?


execwait not aware of path?
I have an installer that begins by installing a series of 3rd party applications, one of them being ActiveState Perl.

After the 3rd party applications are installed I then attempt to use the ppm.bat file which is installed as part of ActivePerl. Inside ppm.bat, a call is made to the perl binary that was also installed as part of ActivePerl. When this call is made, I get:

"'perl' is not recognized as an internal or external command...bla bla...ou do not have Perl in your PATH."

The exact command I am using to invoke ppm is this:

ExecWait '$perl_dirbin\ppm.bat install $Temp\perl_modules\Crypt-SSLeay.ppd'

$perl_dir and $Temp both contain valid paths...(I verified this.)

What's odd about this is that if I stop the installer after it installs ActivePerl and before it tries to use ppm.bat and then open up a command prompt and type 'perl', it knows where perl is and uses it. So obviously it has been placed in my PATH variable and is useable.

It gets wierder though...If I re-run the installer after ActivePerl has been installed, the calls to ppm.bat work just fine.

Obviously the ActivePerl installer modifies the PATH variable during installation, but the modification should be immediately available. So it seems to me that somehow the PATH variable available to anything called by ExecWait is locked into the state it was at before the NSIS installer was ran. Is this correct? If not, where did I go wrong...and if so, what are my options?

Thanks,
Nick


Perhaps if you're calling these things all in the same ExecWait it's as though you ran them all in the same command window: the path is set when the window is opened. If this is the case, just use multiple ExecWaits.


The environment variable modification is immediately available only to Explorer. Every new process that is executed from Explorer will get the new variable, but running processes will keep their old environment block.

To set environment variables for the running installer, use:

http://nsis.sourceforge.net/Setting_...taller_Process


Thanks very much kichik, that did the trick.