We think we found a bug in Advanced Installer. We were able to reproduce it on an installer created with Advanced Installer 11.1 although we tried with an installer created with Advanced Installer 11.8 (latest version to date) and could reproduce it too.
The behavior we observe is that the installer deletes "C:\Documents and Settings" and "C:\BOOTSECT.BAK" when uninstalling under the LocalSystem account.
OS: Windows 7 Professional with Service Pack 1 (x64)
Steps to reproduce it:
- 1. Create the installer:
- a. Create a new Advanced Installer Professional project.
b. Go to "Media" and change "DefaultBuild" from "Single MSI (resources inside)" to "Single EXE setup (resources inside)".
c. Check the option "Do not delete the extracted MSI and CAB files".
d. Add a "MSI Build" -> "MSI setup file" below DefaultBuild.
e. Delete DefaultBuild.
f. Save the project.
g. Build the project.
- a. Run the .msi built above. Wait for the installation to finish.
- a. Open AIWindowsService1.exe.config in Notepad.
b. Locate "<add key="ProductCode" value=""/>" and enter the product code of the .msi built above in the value attribute.
c. Save the changes.
- a. Open cmd.exe with administrator privileges.
b. Enter C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "path to AIWindowsService1.exe".
c. Close cmd.
- a. Open services.msc.
b. Locate AIWindowsService1 -> Right-click -> Start.
- a. Create a new Advanced Installer Professional project.
Notice that "C:\Documents and Settings" and "C:\BOOTSECT.BAK" were deleted after the uninstallation finished.
We believe this behavior is caused by the DeleteExtractionPath function in lzmaextractor.dll which is called by the AI_DeleteUninstallLzma custom action with an empty CustomActionData (empty AI_EXPANDED_EXTRACTION_PATH). DeleteExtractionPath calls SHFileOperation with wFunc = FO_DELETE and pFrom = "\*.*" causing the side effect.
Screencast: https://app.box.com/s/g6gp2swhh07jnpio0tqb0ufgs6dyblxt
Windows service (compiled and source code) is attached.
Let us know if any other information is required.
Thanks,
Nicolás.
FOLLOW US
Get the latest news in Application Packaging