nicolasf
Posts: 15
Joined: Mon Mar 02, 2015 4:17 pm

Bug: installer deletes registry key even when value removal evaluates to false

Hello,
We think we found a bug in Advanced Installer. We were able to reproduce it on an installer created with Advanced Installer 13.1 but not with Advanced Installer 12.8.

OS: Windows 7 Professional with Service Pack 1 (x64)

Steps to reproduce it:
  1. Open Advanced Installer 12.8.
  2. Create a Professional project (under Generic Templates).
  3. Go to Resources -> Files and Folders.
  4. Add "C:\Windows\notepad.exe" under Application Folder. This will create a component called notepad.exe.
  5. Go to Resources -> Registry.
  6. Create a new key under Current user/Local machine -> Software called "Test" (without quotes).
  7. Create a new key called "Test" (without quotes) under the "Test" key created above. The full registry path is HK_UM\Software\Test\Test.
  8. Create a new value removal under HK_UM\Software\Test\Test with the following values:
    • Name: "YourValue" (without quotes)
    • Component: notepad.exe.
    • Remove On: Component install
    • Condition: 1=2
  9. Save the project with a name of "Your Application.aip".
  10. Build.
  11. Open Registry Editor (regedit.exe).
  12. Go to HKEY_LOCAL_MACHINE\SOFTWARE and create a new key called "Test" (without quotes).
  13. Create a new key called "Test" (without quotes) under the "Test" key created above. The key name is HKEY_LOCAL_MACHINE\SOFTWARE\Test\Test.
  14. Create a new string value called "YourValue" (without quotes) with a value data of "aaa" (without quotes).
  15. Run the installer built on 10. You will see that the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Test\Test and the value "YourValue" was not removed which is expected because the condition should evaluate to false.
  16. Uninstall Your Application.
  17. Open "Your Application.aip" created with Advanced Installer 12.8 in Advanced Installer 13.1. Advanced Installer will show "Project converted from a previous version (12.8)".
  18. Rebuild All.
  19. Run the installer built on 18). You will see that the whole registry key HKEY_LOCAL_MACHINE\SOFTWARE\Test\Test was removed which is incorrect.
Let us know if any other information is required.

Thanks,
Nicolás.
Attachments
Your Application.aip
(14.3 KiB) Downloaded 459 times
Eusebiu
Posts: 4966
Joined: Wed Nov 14, 2012 2:04 pm

Re: Bug: installer deletes registry key even when value removal evaluates to false

Hi Nicolás,

I tested the scenario and, indeed, I reproduced the problem. This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nicolasf
Posts: 15
Joined: Mon Mar 02, 2015 4:17 pm

Re: Bug: installer deletes registry key even when value removal evaluates to false

Hi Eusebiu,
Was this fixed since I reported it?

Thanks,
Nicolás.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Bug: installer deletes registry key even when value removal evaluates to false

Hi Nicolás,

Not yet unfortunately but you will get a notification when the fix will be out. Its priority was just increased.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
TheBeardedDev
Posts: 3
Joined: Wed Sep 07, 2016 5:28 pm

Re: Bug: installer deletes registry key even when value removal evaluates to false

Nicolás/Anyone else who sees this

I came across this exact same issue recently.
Jumped on today (11/1/16) and saw the new version 13.3 was just posted with the bug fix of "Registry key removal operation failed"

Decided I'd give it a shot, quick upgrade, rebuilt and now the registry keys are behaving as the did before the orginal upgrade from that broke it.

Andrew
Eusebiu
Posts: 4966
Joined: Wed Nov 14, 2012 2:04 pm

Re: Bug: installer deletes registry key even when value removal evaluates to false

Hi Andrew,

Indeed, the problem discussed in this thread was not fixed yet. The fix mentioned in the 13.3 release note refers to a problem where some entries that were manually added to the registry were not removed even if a "Registry removal" operation was configured for them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”