]> git.lyx.org Git - features.git/blobdiff - development/Win32/packaging/installer/include/LaTeX.nsh
fix 2 more installer issues
[features.git] / development / Win32 / packaging / installer / include / LaTeX.nsh
index 929531e4c9881a5a12f537cba472d716967ef3a8..d1b0168192220b3af8cd24a7544c4e755692e9c5 100644 (file)
@@ -129,7 +129,11 @@ FunctionEnd
    ${endif}
    ${if} $PathLaTeX != ""
     # set package repository (MiKTeX's primary package repository)
-    WriteRegStr $MiKTeXUser "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" # special entry to tell the uninstaller that it was installed with LyX
+    ${if} $MiKTeXUser == "HKCU"
+     WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" # special entry to tell the uninstaller that it was installed with LyX
+    ${else}
+     WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
+    ${endif}
     StrCpy $LaTeXInstalled "MiKTeX"
     StrCpy $MiKTeXVersion ${MiKTeXDeliveredVersion}
    ${else}