A major requirement of this package is for the Notepad.exe in System32 folder to be replaced by Notepad.exe supplied by UltraEdit application. This is to enable Notepad to always start with Ultraedit-32. But the main problem here was that Notepad.exe is a Windows Files Protected. i.e WFP.. This meant that Windows Installer was prevented from replacing this file. Windows Installer never attempts to install or replace a protected file.(see Microsoft website for more information). However, in order to bring about the desired result, that is , allowing the file NOTEPAD.exe to be replaced by Windows Installer, I undertook the following:
Wrote a batch file to rename notepad.exe in System32 folder to notepad.exe1. Created a WiseScript to incorporate the this batch file. Thereafter, through custom action call this WiseScript. Another script was also written to rename the Notepad.exe1 to its normal name during un-install using IF Statement at the Custom action.
- Install UltraEdit normally like you want it.
- register it...
- Copy ueinstall.sss and uedit32.REG from the UltraEdit directory and copy it in the same directory of the Setup.
- Rename ueinstall.sss to uesetup.sss (in case the setup is named uesetup.exe)
- Call uesetup.exe /s
- copy uedit32.REG do install dir