make the notepad replace more failprove

This commit is contained in:
Mario Fetka 2013-05-19 17:38:01 +02:00
parent 68275c2332
commit c34b50d393
2 changed files with 26 additions and 28 deletions

View File

@ -33,7 +33,7 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
sub_check_exitcode
endif
comment "Restore original Notepad"
Winbatch_restore_32
Dosbatch_restore_32
comment "Delete files"
Files_uninstall_32 /32Bit
@ -64,7 +64,8 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
sub_check_exitcode
endif
comment "Restore original Notepad"
Winbatch_restore_64
Dosbatch_restore_32
Dosbatch_restore_64
comment "Delete files"
Files_uninstall_64 /64Bit
@ -84,9 +85,10 @@ ExitWindows /Reboot
[Winbatch_uninstall_32]
"$UninstallProgram32$" /S
[Winbatch_restore_32]
pendmove %Systemroot%\notepad.exe.orig %Systemroot%\notepad.exe
pendmove %Systemroot%\system32\notepad.exe.orig %Systemroot%\system32\notepad.exe
[Dosbatch_restore_32]
@echo off
If exist "%Systemroot%\notepad.exe.orig" (pendmove "%Systemroot%\notepad.exe.orig" "%Systemroot%\notepad.exe")
If exist "%Systemroot%\system32\notepad.exe.orig" (pendmove "%Systemroot%\system32\notepad.exe.orig" "%Systemroot%\system32\notepad.exe")
[Files_uninstall_32]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
@ -99,10 +101,9 @@ delete -sf "$InstallDir32$\"
[Winbatch_uninstall_64]
"$UninstallProgram64$" /S
[Winbatch_restore_64]
pendmove %Systemroot%\notepad.exe.orig %Systemroot%\notepad.exe
pendmove %Systemroot%\system32\notepad.exe.orig %Systemroot%\system32\notepad.exe
pendmove %Systemroot%\SysWOW64\notepad.exe.orig %Systemroot%\SysWOW64\notepad.exe
[Dosbatch_restore_64]
@echo off
If exist "%Systemroot%\SysWOW64\notepad.exe.orig" (pendmove "%Systemroot%\SysWOW64\notepad.exe.orig" "%Systemroot%\SysWOW64\notepad.exe")
[Files_uninstall_64]
; Example for recursively deleting the installation directory:

View File

@ -76,7 +76,7 @@ else
Winbatch_install_32
Sub_check_exitcode
comment "Replace Notepad with npp"
Winbatch_replace_32
Dosbatch_replace_32
comment "Copy files"
Files_install_32 /32Bit
comment "Patch Registry"
@ -92,7 +92,8 @@ else
Winbatch_install_64
Sub_check_exitcode
comment "Replace Notepad with npp"
Winbatch_replace_64
Dosbatch_replace_32
Dosbatch_replace_64
comment "Copy files"
Files_install_64 /64Bit
comment "Patch Registry"
@ -107,15 +108,16 @@ endif
[Winbatch_install_32]
"$InstallExe$" /S
[Winbatch_replace_32]
pendmove %Systemroot%\notepad.exe %Systemroot%\notepad.exe.orig
pendmove %Systemroot%\system32\notepad.exe %Systemroot%\system32\notepad.exe.orig
[Dosbatch_replace_32]
@echo off
If NOT exist "%Systemroot%\notepad.exe.orig" (pendmove "%Systemroot%\notepad.exe" "%Systemroot%\notepad.exe.orig")
If NOT exist "%Systemroot%\system32\notepad.exe.orig" (pendmove "%Systemroot%\system32\notepad.exe" "%Systemroot%\system32\notepad.exe.orig")
vcopy %ScriptPath%\X86\i686\wait_for_exit\notepad.exe %Systemroot%\notepad.exe.pp
vcopy %ScriptPath%\X86\i686\wait_for_exit\notepad.exe %Systemroot%\system32\notepad.exe.pp
vcopy "%ScriptPath%\X86\i686\wait_for_exit\notepad.exe" "%Systemroot%\notepad.exe.pp"
vcopy "%ScriptPath%\X86\i686\wait_for_exit\notepad.exe" "%Systemroot%\system32\notepad.exe.pp"
pendmove %Systemroot%\notepad.exe.pp %Systemroot%\notepad.exe
pendmove %Systemroot%\system32\notepad.exe.pp %Systemroot%\system32\notepad.exe
pendmove "%Systemroot%\notepad.exe.pp" "%Systemroot%\notepad.exe"
pendmove "%Systemroot%\system32\notepad.exe.pp" "%Systemroot%\system32\notepad.exe"
[Files_install_32]
@ -129,18 +131,13 @@ copy "$IniCfgFile$" "$InstallDir32$"
[Winbatch_install_64]
"$InstallExe$" /S
[Winbatch_replace_64]
pendmove %Systemroot%\notepad.exe %Systemroot%\notepad.exe.orig
pendmove %Systemroot%\system32\notepad.exe %Systemroot%\system32\notepad.exe.orig
pendmove %Systemroot%\SysWOW64\notepad.exe %Systemroot%\SysWOW64\notepad.exe.orig
[Dosbatch_replace_64]
@echo off
If NOT exist "%Systemroot%\SysWOW64\notepad.exe.orig" (pendmove "%Systemroot%\SysWOW64\notepad.exe" "%Systemroot%\SysWOW64\notepad.exe.orig")
vcopy %ScriptPath%\X86\x86_64\wait_for_exit\notepad.exe %Systemroot%\notepad.exe.pp
vcopy %ScriptPath%\X86\x86_64\wait_for_exit\notepad.exe %Systemroot%\system32\notepad.exe.pp
vcopy %ScriptPath%\X86\x86_64\wait_for_exit\notepad.exe %Systemroot%\SysWOW64\notepad.exe.pp
vcopy "%ScriptPath%\X86\x86_64\wait_for_exit\notepad.exe" "%Systemroot%\SysWOW64\notepad.exe.pp"
pendmove %Systemroot%\notepad.exe.pp %Systemroot%\notepad.exe
pendmove %Systemroot%\system32\notepad.exe.pp %Systemroot%\system32\notepad.exe
pendmove %%Systemroot%\SysWOW64\notepad.exe.pp %Systemroot%\SysWOW64\notepad.exe
pendmove "%Systemroot%\SysWOW64\notepad.exe.pp" %Systemroot%\SysWOW64\notepad.exe"
[Files_install_64]