spacefight
27th September 2005, 14:18
Hi Forum,
My NSIS script installs Perl via ExecWait to msiexec silently. The Perl Installation Wizard adds the path to perl to the PATH variable. After installing Perl, I want to install Perl modules via ExecWait to PPM (the perl package manager).
This step fails because the newly started ExecWait thread/program/whatever does not see the path to perl added by the Perl Installer.
If I open a new shell window after the installation is done and start PPM, it works, so the path is then correctly loaded.
Now my Question:
Is there a method for an installation script to add a directory to the PATH value so that later ExecWaits within the same installation script can use it?
If the PATH to perl is set before PPM runs, it all works fine.
Thanks for any hints,
spacefight
Code Snippet:
; install perl which adds C:\perl\bin\perl.exe to the PATH variable
ExecWait 'msiexec /i "$INSTDIR\ActivePerl-5.8.7.813-MSWin32-x86-148120.msi" /qn INSTALLDIR=C:\perl\ PERL_PATH="Yes" /l $INSTDIR\perlinstall.log'
[..]
; install IO-stringy module
ExecWait 'c:\perl\bin\ppm.bat install $INSTDIR\perl\IO-stringy.ppd'
My NSIS script installs Perl via ExecWait to msiexec silently. The Perl Installation Wizard adds the path to perl to the PATH variable. After installing Perl, I want to install Perl modules via ExecWait to PPM (the perl package manager).
This step fails because the newly started ExecWait thread/program/whatever does not see the path to perl added by the Perl Installer.
If I open a new shell window after the installation is done and start PPM, it works, so the path is then correctly loaded.
Now my Question:
Is there a method for an installation script to add a directory to the PATH value so that later ExecWaits within the same installation script can use it?
If the PATH to perl is set before PPM runs, it all works fine.
Thanks for any hints,
spacefight
Code Snippet:
; install perl which adds C:\perl\bin\perl.exe to the PATH variable
ExecWait 'msiexec /i "$INSTDIR\ActivePerl-5.8.7.813-MSWin32-x86-148120.msi" /qn INSTALLDIR=C:\perl\ PERL_PATH="Yes" /l $INSTDIR\perlinstall.log'
[..]
; install IO-stringy module
ExecWait 'c:\perl\bin\ppm.bat install $INSTDIR\perl\IO-stringy.ppd'