mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[~] Improve install directory storing and retrieving.
git-svn-id: https://pykd.svn.codeplex.com/svn@62820 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
3506801d3b
commit
48d1d71bad
@ -42,9 +42,6 @@ OutFile "${PRODUCT_SHORT_NAME}_${PRODUCT_ARCH}_${PRODUCT_VERSION}_setup.exe"
|
||||
|
||||
BrandingText "${PRODUCT_FULL_NAME}"
|
||||
|
||||
#Get installation folder from registry if available
|
||||
InstallDirRegKey HKLM "Software\${PRODUCT_SHORT_NAME}" "${PRODUCT_ARCH}"
|
||||
|
||||
#Request application privileges for Windows Vista and 7
|
||||
RequestExecutionLevel admin
|
||||
|
||||
@ -116,12 +113,22 @@ Function .onInit
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
|
||||
!if ${PRODUCT_ARCH} == "x64"
|
||||
${IfNot} ${RunningX64}
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "This installation requires 64-bit OS."
|
||||
Abort
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
# Get installation folder from registry if available
|
||||
!if ${PRODUCT_ARCH} == "x64"
|
||||
${IfThen} ${RunningX64} ${|} SetRegView 64 ${|}
|
||||
!endif
|
||||
ReadRegStr $INSTDIR HKLM "Software\${PRODUCT_SHORT_NAME}" "InstallPath"
|
||||
!if ${PRODUCT_ARCH} == "x64"
|
||||
${IfThen} ${RunningX64} ${|} SetRegView 32 ${|}
|
||||
!endif
|
||||
FunctionEnd
|
||||
|
||||
|
||||
@ -244,5 +251,11 @@ SectionEnd
|
||||
|
||||
Section -FinishSection
|
||||
#Store installation folder
|
||||
WriteRegStr HKLM "Software\${PRODUCT_SHORT_NAME}" "${PRODUCT_ARCH}" "$INSTDIR"
|
||||
!if ${PRODUCT_ARCH} == "x64"
|
||||
${IfThen} ${RunningX64} ${|} SetRegView 64 ${|}
|
||||
!endif
|
||||
WriteRegStr HKLM "Software\${PRODUCT_SHORT_NAME}" "InstallPath" "$INSTDIR"
|
||||
!if ${PRODUCT_ARCH} == "x64"
|
||||
${IfThen} ${RunningX64} ${|} SetRegView 32 ${|}
|
||||
!endif
|
||||
SectionEnd
|
||||
|
Loading…
Reference in New Issue
Block a user