the next registry key is marked as shared in my installation/upgrade(APP1):
"HKEY_LOCAL_MACHINE\SOFTWARE\CompanyName"
after i install app1 the registry exist.
APP2 also writes other registrykeys in the same keyPath:
"HKEY_LOCAL_MACHINE\SOFTWARE\CompanyName"
well when i have both applications installed and i de-install app1 it removes all registry under :
HKEY_LOCAL_MACHINE\SOFTWARE\Oce.
so APP2 doesnt work any more.
is this an IS bug i expect APP1 to not remove this key , because i marked it as shared? and remove only the keys that were made by APP1.
Or do i have to do something else next to marking the key as shared?
hope someone can help me.
greetings fouad
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
All registrykey removed
Started by
Fouad Rziki
, Apr 10 2002 13:51
5 replies to this topic
Posted 11 April 2002 - 09:22
thx again tacobael
i now use RegDBCreateKeyEx to craate the company registry key. but now i encounter other problems.
i disable logging when i set this key, but i need to have this key removed if there is no other applications using this key.
how can i check if there are other keys beneath the company key, without knowing the values of there keys.
i thinks this is impossible. so i will have to accept that they key will always remain behind
i now use RegDBCreateKeyEx to craate the company registry key. but now i encounter other problems.
i disable logging when i set this key, but i need to have this key removed if there is no other applications using this key.
how can i check if there are other keys beneath the company key, without knowing the values of there keys.
i thinks this is impossible. so i will have to accept that they key will always remain behind
Posted 11 April 2002 - 14:22
That same question has popped in my head before, but since I haven't had a need to do it, I haven't looked into it. Therefore, as far as I know, that's not possible, but someone please correct me if I'm wrong.
Posted 18 April 2002 - 09:38
Hi,
some weeks ago, I was in a need of such a solution.
Here is it :
Eberhard
some weeks ago, I was in a need of such a solution.
Here is it :
Code Sample |
//arguments: // nHive = hive key, e.g. HKEY_LOCAL_MACHINE // szRKey = subkey beneath the hive key, e.g. "Software//Company//Product_x" // //returns: 0 if no subkey (szRKey was deleted) // -1 is there were subkeys or entries function RemoveSubKeyIfEmpty(nHive, szRKey) NUMBER nRet; LIST listNames, listKeys; begin RegDBSetDefaultRoot(nHive); listNames = ListCreate(STRINGLIST); listKeys = ListCreate(STRINGLIST); RegDBQueryKey(szRKey, REGDB_NAMES, listNames); RegDBQueryKey(szRKey, REGDB_KEYS, listKeys); if ( (ListCount(listNames) <= 0) && (ListCount(listKeys) <= 0) ) then //is empty RegDBDeleteKey(szRKey); nRet = 0; else nRet = -1; endif; ListDestroy(listNames); ListDestroy(listKeys); return nRet; end; |
Eberhard