I found a small bug in the uninstaller program, and would like to write the fix myself. I have a working copy in my local tree, but it duplicates code.
Basically I found that uninstaller does not scan the uninstall registry entry of HKEY_CURRENT_USER. I took lines 196-197 and duplicated that, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, and then did the same for lines 210-228. I would like to get down to a smaller linecount, but I would like to do the patch myself, so I would appreciate some assistance in figuring out how. Could someone email me privately to help?
Am Montag, 16. April 2007 22:35 schrieb Tom Spear:
I found a small bug in the uninstaller program, and would like to write the fix myself. I have a working copy in my local tree, but it duplicates code.
Basically I found that uninstaller does not scan the uninstall registry entry of HKEY_CURRENT_USER. I took lines 196-197 and duplicated that, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, and then did the same for lines 210-228. I would like to get down to a smaller linecount, but I would like to do the patch myself, so I would appreciate some assistance in figuring out how. Could someone email me privately to help?
Are you by chance talking about Steam?
On 4/16/07, Briareos auronsrv@gmx.net wrote:
Am Montag, 16. April 2007 22:35 schrieb Tom Spear:
I found a small bug in the uninstaller program, and would like to write the fix myself. I have a working copy in my local tree, but it duplicates code.
Basically I found that uninstaller does not scan the uninstall registry entry of HKEY_CURRENT_USER. I took lines 196-197 and duplicated that, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, and then did the same for lines 210-228. I would like to get down to a smaller linecount, but I would like to do the patch myself, so I would appreciate some assistance in figuring out how. Could someone email me privately to help?
Are you by chance talking about Steam?
No im talking about the wine uninstaller program. From the command line, type uninstaller.
It's located in wine/programs/uninstaller..
It's wine's version of the Add/Remove Programs control panel applet.
By the way, in case anyone wants to review it to offer comment, the patch is attached.
On Mo, 2007-04-16 at 16:44 -0500, Tom Spear wrote:
I took lines 196-197 and duplicated that, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, and
You can move most of the code from FetchUninstallInformation() to a seperate function and use the rootkey as Parameter.
get_uninstallinfo_from_reg(HKEY_LOCAL_MACHINE); get_uninstallinfo_from_reg(HKEY_CURRENT_USER);
Did you already checked, what windows does with duplicate Programm names?
More hints:
lstrcpyW(key_app, PathUninstallW); lstrcatW(key_app, BackSlashW); p = key_app+lstrlenW(PathUninstallW)+1;
Why not add the slash direct to PathUninstallW?
sizeOfSubKeyName = 255;
Fixed numbers are not a good Idea (error-prone). This value is related to "WCHAR subKeyName[256];", but RegEnumKeyEx expect the max. size in TCHAR, including the terminating zero, so the correct value for sizeOfSubKeyName is 256.
A nice, automatic way is:
sizeOfSubKeyName = sizeof(subKeyName)/sizeof(subKeyName[0]);
Such a construct works independant from the type (WCHAR / CHAR) and the length of the String.
All together looks like more than one Patch.
On 4/18/07, Detlef Riekenberg wine.dev@web.de wrote:
On Mo, 2007-04-16 at 16:44 -0500, Tom Spear wrote:
I took lines 196-197 and duplicated that, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, and
You can move most of the code from FetchUninstallInformation() to a seperate function and use the rootkey as Parameter.
get_uninstallinfo_from_reg(HKEY_LOCAL_MACHINE); get_uninstallinfo_from_reg(HKEY_CURRENT_USER);
I ended up creating a new patch that does something similar, while keeping the FetchUninstallInformation function
Did you already checked, what windows does with duplicate Programm names?
No, but I will do that in just a minute.
More hints:
lstrcpyW(key_app, PathUninstallW); lstrcatW(key_app, BackSlashW); p = key_app+lstrlenW(PathUninstallW)+1;
Why not add the slash direct to PathUninstallW?
This was already part of the code that I copied. Why the original author of this code did this, I have no clue and was wondering about that as well.
sizeOfSubKeyName = 255;
Fixed numbers are not a good Idea (error-prone). This value is related to "WCHAR subKeyName[256];", but RegEnumKeyEx expect the max. size in TCHAR, including the terminating zero, so the correct value for sizeOfSubKeyName is 256.
A nice, automatic way is:
sizeOfSubKeyName = sizeof(subKeyName)/sizeof(subKeyName[0]);
Such a construct works independant from the type (WCHAR / CHAR) and the length of the String.
See above
All together looks like more than one Patch.
--
By by ... Detlef
Like I said, I ended up rewriting the patch, and in so doing, created a fairly large patch, because most of the functions had to be rewritten to support an array being passed as a parameter. The 2nd patch actually will have to be changed a little more as well because I didn't document anything, however I submitted it here for suggestions so I could have a rough base to work with.
Looking a bit more into the lstrcpyW and lstrcatW situation, the reason it appears to be done is because if you add the slash directly to PathUninstallW, then for some reason, the uninstaller shows no entries, even when there are some.
Part of the reason I duplicated code in the original patch is because if the uninstaller runs that function (or the one you mentioned) twice, then the entries are listed not in alphabetical order. You will have a-z for current user and then below that a-z for local machine. This way keeps it to one a-z for both cu and lm.
Tom
P.S. Windows displays duplicate names as 2 separate entries.
On 4/18/07, Tom Spear speeddymon@gmail.com wrote:
On 4/18/07, Detlef Riekenberg wine.dev@web.de wrote:
On Mo, 2007-04-16 at 16:44 -0500, Tom Spear wrote:
I took lines 196-197 and duplicated that, changing HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, and
You can move most of the code from FetchUninstallInformation() to a seperate function and use the rootkey as Parameter.
get_uninstallinfo_from_reg(HKEY_LOCAL_MACHINE); get_uninstallinfo_from_reg(HKEY_CURRENT_USER);
I ended up creating a new patch that does something similar, while keeping the FetchUninstallInformation function
Did you already checked, what windows does with duplicate Programm names?
No, but I will do that in just a minute.
More hints:
lstrcpyW(key_app, PathUninstallW); lstrcatW(key_app, BackSlashW); p = key_app+lstrlenW(PathUninstallW)+1;
Why not add the slash direct to PathUninstallW?
This was already part of the code that I copied. Why the original author of this code did this, I have no clue and was wondering about that as well.
sizeOfSubKeyName = 255;
Fixed numbers are not a good Idea (error-prone). This value is related to "WCHAR subKeyName[256];", but RegEnumKeyEx expect the max. size in TCHAR, including the terminating zero, so the correct value for sizeOfSubKeyName is 256.
A nice, automatic way is:
sizeOfSubKeyName = sizeof(subKeyName)/sizeof(subKeyName[0]);
Such a construct works independant from the type (WCHAR / CHAR) and the length of the String.
See above
All together looks like more than one Patch.
--
By by ... Detlef
Like I said, I ended up rewriting the patch, and in so doing, created a fairly large patch, because most of the functions had to be rewritten to support an array being passed as a parameter. The 2nd patch actually will have to be changed a little more as well because I didn't document anything, however I submitted it here for suggestions so I could have a rough base to work with.
-- Thanks
Tom
Check out this new 3D Instant Messenger called IMVU. It's the best I have seen yet!
http://imvu.com/catalog/web_invitation.php?userId=1547373&from=power-ema...