ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Microsoft SQL Native Client\CurrentVersion" "Version"
I have three sections that can be installed independent of one another that use SQL Express. I check in each section to see if SQL Express is installed (I do not want to install it if it is already there) by using the above command.
If I run the installer and select two or more of the sections that run this check, all three will download and run the SQL.
If I only choose one section the rerun the installer and add another section, the check works and the SQL is not loaded.
I ran a test. I installed just one of the sections then put in code to halt the install. I had opened regedit prior to starting the installer. The regedit did not show the added key and value at the break. I then closed and restarted regedit and the key was there.
I added a message box to display $R1 but it was blank all three times during the first run that SQL was not previously installed. If SQL was there before I ran the SQLinstaller, $R1 displayed the Version number.
How do I get my installer to notice that a new registry key has been added without requiring the installer to be closed and restarted?