installer: use MiKTeX's update program in admin mode if user is admin

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35580 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2010-10-09 15:39:24 +00:00
parent b308435f04
commit 0d568cf2ca

View File

@ -180,7 +180,11 @@ Function ConfigureMiKTeX
File /r "${DVIPostFileDir}" File /r "${DVIPostFileDir}"
# refresh MiKTeX's file name database # refresh MiKTeX's file name database
ExecWait "$LaTeXPath\initexmf --update-fndb" ${if} $MiKTeXUser != "HKCU" # call the admin version when the user is admin
ExecWait "$LaTeXPath\initexmf --admin --update-fndb"
${else}
ExecWait "$LaTeXPath\initexmf --update-fndb"
${endif}
# enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me first) # enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me first)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for current user WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for current user