Re: [1/2] uninstaller: add ability to scan HKCU for uninstall entries (Try 2)
On 6/1/07, Tom Spear <speeddymon(a)gmail.com> wrote:
Here is a 2nd attempt at the last one I sent. This time the root field is initialized, and this part of the patch is written against current git, not against changes to my own tree. Oh and its onl;y a 2-parter
This will make wine's programs/uninstaller look thru not only HKEY_LOCAL_MACHINE for uninstall entries, but also HKEY_CURRENT_USER.
+ /* Loop thru HKCU first, then thru HKLM */ + for (iRootKey=0; iRootKey<sizeof(rootKeys) / sizeof(rootKeys[0]); ++iRootKey) + { + /* If there is no uninstall info in a specific root key, + * finish this run and go to the next */ + if (RegOpenKeyExW(rootKeys[iRootKey], PathUninstallW, 0, + KEY_READ, &hkeyUninst) != ERROR_SUCCESS) + continue; Indentation? -- James Hawkins
On 6/1/07, James Hawkins <truiken(a)gmail.com> wrote:
On 6/1/07, Tom Spear <speeddymon(a)gmail.com> wrote:
Here is a 2nd attempt at the last one I sent. This time the root field is initialized, and this part of the patch is written against current git, not against changes to my own tree. Oh and its onl;y a 2-parter
This will make wine's programs/uninstaller look thru not only HKEY_LOCAL_MACHINE for uninstall entries, but also HKEY_CURRENT_USER.
+ /* Loop thru HKCU first, then thru HKLM */ + for (iRootKey=0; iRootKey<sizeof(rootKeys) / sizeof(rootKeys[0]); ++iRootKey) + { + /* If there is no uninstall info in a specific root key, + * finish this run and go to the next */ + if (RegOpenKeyExW(rootKeys[iRootKey], PathUninstallW, 0, + KEY_READ, &hkeyUninst) != ERROR_SUCCESS) + continue;
Indentation?
It was recommended to separate the indentation from the rest of the patch by Dan, because it makes it easier to see what lines actually changed.... -- Thanks Tom
participants (2)
-
James Hawkins -
Tom Spear