Update path environment variable after installing external components. This fixes problems with MiKTeX 2.5 detection.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15133 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Joost Verburg 2006-09-22 22:30:06 +00:00
parent b05f1989ea
commit 05995ad039
2 changed files with 18 additions and 0 deletions

View File

@ -56,6 +56,7 @@ External Components: MiKTeX, ImageMagick, Ghostscript
install_${component}:
ExecWait '"$PLUGINSDIR\${component}Setup.exe"'
Call UpdatePathEnvironment
Call Search${component}
${if} $Path${component} == ""

View File

@ -47,6 +47,23 @@ Function CheckPriviledges
FunctionEnd
Function UpdatePathEnvironment
Push $R0
Push $R1
;Updates the path environment variable of the instaler process to the latest system value
ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" Path
ReadRegStr $R1 HKCU "Environment" Path
System::Call 'kernel32::SetEnvironmentVariableA(t, t) i("Path", "$R0;$R1").r0'
Pop $R1
Pop $R0
FunctionEnd
Function un.SetShellContext
Push $R0