From: Uwe Stöhr Date: Sat, 15 Nov 2008 14:52:49 +0000 (+0000) Subject: installer: fix http://bugzilla.lyx.org/show_bug.cgi?id=5506 X-Git-Tag: 2.0.0~7772 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=42fded69af5acf8328e0199678413a5cdc989c0d;p=features.git installer: fix http://bugzilla.lyx.org/show_bug.cgi?id=5506 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27455 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi b/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi index de9c207934..8a9848cd40 100644 --- a/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi +++ b/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi @@ -228,7 +228,7 @@ Function .onInit ${endif} # printer settings, needed to install the Metafile2eps printer - !insertmacro PrinterInit + !insertmacro PrinterInit # macro from InstallThirdPartyProgs.nsh # default settings # these can be reset to "all" in section SecAllUsers diff --git a/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi b/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi index 4a1b84834c..ee35e3210d 100644 --- a/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi +++ b/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi @@ -223,7 +223,7 @@ Function .onInit ${endif} # printer settings, needed to install the Metafile2eps printer - !insertmacro PrinterInit + !insertmacro PrinterInit # macro from InstallThirdPartyProgs.nsh # default settings # these can be reset to "all" in section SecAllUsers diff --git a/development/Win32/packaging/AltInstaller/LyXUtils.nsh b/development/Win32/packaging/AltInstaller/LyXUtils.nsh index 1bb951e2eb..eee2b1908b 100644 --- a/development/Win32/packaging/AltInstaller/LyXUtils.nsh +++ b/development/Win32/packaging/AltInstaller/LyXUtils.nsh @@ -112,12 +112,20 @@ FunctionEnd #-------------------------------- !macro AppPreSuff AppPre AppSuff - # the APPDATA path has always the following structure: + # the APPDATA path for a local user has for WinXP and 2000 the following structure: # C:\Documents and Settings\username\Application Data + # for Win Vista the structure is: + # C:\Users\username\AppData\Roaming # this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre" # and the "Application Data" substring into the variable "AppSuff" + SetShellVarContext current # switch temoprarily to local user StrCpy $String "$APPDATA" + Var /GLOBAL APPDATemp + StrCpy $APPDATemp "$APPDATA" + ${if} $ProductRootKey == "HKLM" + SetShellVarContext all # move back to all users + ${endif} StrCpy $Search "\" Call StrPoint # search for the first "\" IntOp $Pointer $Pointer + 1 # jump after the "\" @@ -125,7 +133,7 @@ FunctionEnd StrCpy $0 $Pointer Call StrPoint # search for the second "\" IntOp $0 $0 + $Pointer # $0 is now the pointer to the second "\" in the APPDATA string - StrCpy ${AppPre} $APPDATA $0 # save the part before the second "\" + StrCpy ${AppPre} $APPDATemp $0 # save the part before the second "\" IntOp $Pointer $Pointer + 1 # jump after the "\" StrCpy $String $String "" $Pointer # cut off the part before the second "\" Call StrPoint # search for the third "\" @@ -257,12 +265,19 @@ FunctionEnd #-------------------------------- !macro UnAppPreSuff AppPre AppSuff - # the APPDATA path has always the following structure: + # the APPDATA path for a local user has for WinXP and 2000 the following structure: # C:\Documents and Settings\username\Application Data + # for Win Vista the structure is: + # C:\Users\username\AppData\Roaming # this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre" # and the "Application Data" substring into the variable "AppSuff" + SetShellVarContext current # switch temoprarily to local user StrCpy $String "$APPDATA" + StrCpy $APPDATemp "$APPDATA" + ${if} $Answer == "yes" # then user has admin priviledges + SetShellVarContext all # move back to all users + ${endif} StrCpy $Search "\" Call un.StrPoint # search for the first "\" IntOp $Pointer $Pointer + 1 # jump after the "\" @@ -270,7 +285,7 @@ FunctionEnd StrCpy $0 $Pointer Call un.StrPoint # search for the second "\" IntOp $0 $0 + $Pointer # $0 is now the pointer to the second "\" in the APPDATA string - StrCpy ${AppPre} $APPDATA $0 # save the part before the second "\" + StrCpy ${AppPre} $APPDATemp $0 # save the part before the second "\" IntOp $Pointer $Pointer + 1 # jump after the "\" StrCpy $String $String "" $Pointer # cut off the part before the second "\" Call un.StrPoint # search for the third "\"