This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: registry key not deleted
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jun 25, 2008
07:21 PM
registry key not deleted
I'm creating 2 registry keys with a specific component under my Main App. This component's contents are only installed with Vista. The Uninstall setting is set to Yes. The files installed by that component are being removed during the app's uninstallation, but the 2 registry keys are not.
I was going to attempt a RegDBDeleteKey(), but the instructions for that function explain it's better to use Registry view in InstallShield for the sake of being neat. But, only the registry values when right clicked have the Remove during uninstall option, the keys do not.
It's imperative these keys get uninstalled when the app is removed.
Any ideas?
I was going to attempt a RegDBDeleteKey(), but the instructions for that function explain it's better to use Registry view in InstallShield for the sake of being neat. But, only the registry values when right clicked have the Remove during uninstall option, the keys do not.
It's imperative these keys get uninstalled when the app is removed.
Any ideas?
(6) Replies
‎Jun 25, 2008
08:39 PM
Hell, I can't even get RegDBDeleteKey() to work.
I created an export function as per the InstallShield help:
*************************************************
export prototype ExFn_RegDBDeleteKey(HWND);
function ExFn_RegDBDeleteKey(hMSI)
STRING szKey, szClass, szKeyRoot, szMsg, svLogFile;
NUMBER nResult1, nResult2, nRootKey;
begin
// Set up parameters for call to RegDBCreateKeyEx.
nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot (nRootKey) < 0) then
MessageBox ("RegDBSetDefaultRoot failed.", SEVERE);
else
MessageBox ("RegDBSetDefaultRoot failed.", SEVERE);
endif;
// Call RegDBDeleteKey to delete the key just created.
if (RegDBDeleteKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{D58809CA-65AF-4ec9-A985-E264EEDBE54D}") < 0) then
MessageBox ("RegDBDeleteKey failed.", SEVERE);
else
MessageBox ("RegDBDeleteKey success.", SEVERE);
endif;
end;
**********************************************************
I tried calling this function during the Main App's OnUninstalling and OnUninstalled, and the function never fires.
I'm at a loss. This project is from a recent upgrade from InstallShield Professional 7 project. Can that have some effect? Maybe I'll just start from scratch, it's not a big project.
I created an export function as per the InstallShield help:
*************************************************
export prototype ExFn_RegDBDeleteKey(HWND);
function ExFn_RegDBDeleteKey(hMSI)
STRING szKey, szClass, szKeyRoot, szMsg, svLogFile;
NUMBER nResult1, nResult2, nRootKey;
begin
// Set up parameters for call to RegDBCreateKeyEx.
nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot (nRootKey) < 0) then
MessageBox ("RegDBSetDefaultRoot failed.", SEVERE);
else
MessageBox ("RegDBSetDefaultRoot failed.", SEVERE);
endif;
// Call RegDBDeleteKey to delete the key just created.
if (RegDBDeleteKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{D58809CA-65AF-4ec9-A985-E264EEDBE54D}") < 0) then
MessageBox ("RegDBDeleteKey failed.", SEVERE);
else
MessageBox ("RegDBDeleteKey success.", SEVERE);
endif;
end;
**********************************************************
I tried calling this function during the Main App's OnUninstalling and OnUninstalled, and the function never fires.
I'm at a loss. This project is from a recent upgrade from InstallShield Professional 7 project. Can that have some effect? Maybe I'll just start from scratch, it's not a big project.
‎Jun 25, 2008
09:24 PM
Wow.
Created a new project from scratch. Now one of the keys is being deleted, but the other is not.
For this new project, I created a new registry set in the System Configuration > Registry window and did an import reg file. Then went to Organization > Setup Design > Main App > My Component > Registry Data and added the just created registry set into my components Registry Set Install Conditions.
Why would one reg key from a registry set be deleted and one not?
The one that didn't is in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\' if that makes a difference.
The uninstallation is working, because the dll that the aforementioned key is referencing is deleted. But, I'd hate to leave a reference in my Credential Provider key. At least it's not like a GINA key where the OS blows up if the dll is gone, but the key remains.
If anybody can help, I'd appreciate it!
Created a new project from scratch. Now one of the keys is being deleted, but the other is not.
For this new project, I created a new registry set in the System Configuration > Registry window and did an import reg file. Then went to Organization > Setup Design > Main App > My Component > Registry Data and added the just created registry set into my components Registry Set Install Conditions.
Why would one reg key from a registry set be deleted and one not?
The one that didn't is in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\' if that makes a difference.
The uninstallation is working, because the dll that the aforementioned key is referencing is deleted. But, I'd hate to leave a reference in my Credential Provider key. At least it's not like a GINA key where the OS blows up if the dll is gone, but the key remains.
If anybody can help, I'd appreciate it!
‎Jun 26, 2008
05:51 AM
Have u tried by seleting uninstall entire key option in the registry.
‎Jul 03, 2008
10:51 AM
alexsd1 wrote:
i don't follow. is that a registry key setting in installshield?
Correct
see example attached where you can set the option for the behavior
if you right click on the approriate reg key you (see example attached where you can set the option for the behavior) can choose what shoud happen with the reg key
for your problem i think the option "Install if Absent, Uninstall if present" shoud be the right choice
which means, Installshield Setup Manager creates the key file if it dosen't exists on the target while setup is running and otherwise kill it, if its present on the target
‎Jul 03, 2008
10:54 AM
Update:
if you do an uninstall of the application IS takes of course automatically care to delete the key if its possible
if you do an uninstall of the application IS takes of course automatically care to delete the key if its possible