summaryrefslogtreecommitdiff
path: root/main.nsi
diff options
context:
space:
mode:
authorRobert Millan <rmh@debian.org>2008-02-24 10:26:22 +0000
committerRobert Millan <rmh@debian.org>2008-02-24 10:26:22 +0000
commit88893e6ed18ef3aa153b6a3562da26454eaae821 (patch)
tree873ed29f91af456890865767e4524d35e42d97b0 /main.nsi
parenteca0651e5996e093a93adab1cea1b6d59ec7d62a (diff)
* Fix bcdedit load in 64-bit Vista. Thanks Amir Szekely for the hints.
(Closes: #441379) r51551
Diffstat (limited to 'main.nsi')
-rw-r--r--main.nsi27
1 files changed, 20 insertions, 7 deletions
diff --git a/main.nsi b/main.nsi
index 2335d3e..9222572 100644
--- a/main.nsi
+++ b/main.nsi
@@ -66,6 +66,7 @@ Var /GLOBAL preseed_cmdline
Var /GLOBAL preseed_cfg
Var /GLOBAL proxy
Var /GLOBAL arch
+Var /GLOBAL bcdedit
Function .onInit
InitPluginsDir
@@ -735,12 +736,18 @@ boot"
MessageBox MB_OK|MB_ICONSTOP "$(error_copyfiles)"
Quit
!endif
+ ; FIXME: this blurb is duplicated in the uninstaller. keep in sync!
+ GetFullPathName $bcdedit $WINDIR\Sysnative\bcdedit.exe
+ ${If} $bcdedit == ""
+ StrCpy $bcdedit $SYSDIR\bcdedit.exe
+ ${Endif}
+
ReadRegStr $0 HKLM "Software\Debian\Debian-Installer Loader" "bootmgr"
${If} $0 == ""
- nsExec::ExecToStack '"bcdedit" /create /d "$(d-i)" /application bootsector'
+ nsExec::ExecToStack '"$bcdedit" /create /d "$(d-i)" /application bootsector'
Pop $0
${If} $0 != 0
- StrCpy $0 bcdedit.exe
+ StrCpy $0 $bcdedit
MessageBox MB_OK|MB_ICONSTOP "$(error_exec)"
Quit
${Endif}
@@ -755,9 +762,9 @@ boot"
; and for uninstaller.
WriteRegStr HKLM "Software\Debian\Debian-Installer Loader" "bootmgr" "$0"
${Endif}
- nsExec::Exec '"bcdedit" /set $0 device boot'
- nsExec::Exec '"bcdedit" /set $0 path \g2ldr.mbr'
- nsExec::Exec '"bcdedit" /displayorder $0 /addlast'
+ nsExec::Exec '"$bcdedit" /set $0 device boot'
+ nsExec::Exec '"$bcdedit" /set $0 path \g2ldr.mbr'
+ nsExec::Exec '"$bcdedit" /displayorder $0 /addlast'
${Endif}
SectionEnd
@@ -792,10 +799,16 @@ Section "Uninstall"
ReadRegStr $0 HKLM "Software\Debian\Debian-Installer Loader" "bootmgr"
${If} $0 != ""
- nsExec::Exec '"bcdedit" /delete $0'
+ ; FIXME: this blurb is duplicated in the installer. keep in sync!
+ GetFullPathName $bcdedit $WINDIR\Sysnative\bcdedit.exe
+ ${If} $bcdedit == ""
+ StrCpy $bcdedit $SYSDIR\bcdedit.exe
+ ${Endif}
+
+ nsExec::Exec '"$bcdedit" /delete $0'
Pop $0
${If} $0 != 0
- StrCpy $0 bcdedit.exe
+ StrCpy $0 $bcdedit
MessageBox MB_OK|MB_ICONSTOP "$(error_exec)"
${Endif}
${Endif}