Change Windows installer to use the root drive, instead of a hardcoded C:\

(fixes #271)
This commit is contained in:
freem
2014-08-20 15:28:09 -05:00
parent 493d0f8214
commit 8b062785ea
+8 -1
View File
@@ -54,7 +54,9 @@
; I think it may need actual admin privs for writing to the registry... -aj
;RequestExecutionLevel user
InstallDir "C:\Games\${PRODUCT_ID}"
; $INSTDIR is defined in .onInit below. Old line is left here just in case.
;InstallDir "C:\Games\${PRODUCT_ID}"
InstallDir "${INSTDIR}"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}" ""
; DirShow show ; (make this hide to not let the user change it)
@@ -689,6 +691,11 @@ Function .onInit
;!define MUI_LANGDLL_ALWAYSSHOW
!insertmacro MUI_LANGDLL_DISPLAY
; determine root drive where Windows was installed, and suggest a
; reasonable directory for installation.
StrCpy $0 "$WINDIR" 2
StrCpy $INSTDIR "$0\Games\${PRODUCT_ID}"
!ifdef SHOW_AUTORUN
;
; Extract files for the InstallOptions page