How to remove registry keys under HKLM\SW\Ms\Win\CurrentVersion\Installer\Folders
Hello.
Uninstalling my application package leave some registry keys under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders\<MyApplication_folders>.
Those registry keys which are left after uninstallation are pointed to folders which are created by CustomAction of type 35 - set Directory name.
Others registry keys pointed to folders which are created by default with InstallShield are removed automaticly.
How can I set or what I have to do that those registry keys will be removed after uninstallation?
Thanks in advance
Andreo
Uninstalling my application package leave some registry keys under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders\<MyApplication_folders>.
Those registry keys which are left after uninstallation are pointed to folders which are created by CustomAction of type 35 - set Directory name.
Others registry keys pointed to folders which are created by default with InstallShield are removed automaticly.
How can I set or what I have to do that those registry keys will be removed after uninstallation?
Thanks in advance
Andreo
0 Comments
[ + ] Show comments
Answers (13)
Please log in to answer
Posted by:
jamsek19
8 years ago
I will answer to this question by myself.
After some kilometers of installer I found out that mentioned registry keys are removed only if the folders registry keys pointed to are empty. I have some log files in those folders, which were created by application not by installer.
I had set my custom cleanup procedure to late in a sequence and therefore during uninstall the folders were not empty.
Consequently, the registry keys remained in a registry.
So, after all the problem was on my side, even that installer made mentioned registry keys.
I saw a lot of this kind of "remained" registry keys in my registry, so I hope I help someone to clear this.
Thanks for all help!
BR,
After some kilometers of installer I found out that mentioned registry keys are removed only if the folders registry keys pointed to are empty. I have some log files in those folders, which were created by application not by installer.
I had set my custom cleanup procedure to late in a sequence and therefore during uninstall the folders were not empty.
Consequently, the registry keys remained in a registry.
So, after all the problem was on my side, even that installer made mentioned registry keys.
I saw a lot of this kind of "remained" registry keys in my registry, so I hope I help someone to clear this.
Thanks for all help!
BR,
Posted by:
anonymous_9363
15 years ago
The simplest way is to populate the RemoveRegistry table. http://msdn.microsoft.com/en-us/library/aa371208(VS.85).aspx
Posted by:
AngelD
15 years ago
Posted by:
anonymous_9363
15 years ago
I *was* going to suggest stopping the CA running and instead have the folders created by using the CreateFolders table but decided against it, having judged the OP's level of knowledge from the question.
You're right, of course, Kim. I'd wager that the MSI is one of those which get knocked out quickly by vendors, where install CAs have no corresponding uninstall CA, in this case, to remove the folders created.
You're right, of course, Kim. I'd wager that the MSI is one of those which get knocked out quickly by vendors, where install CAs have no corresponding uninstall CA, in this case, to remove the folders created.
Posted by:
jamsek19
15 years ago
Thanks for all answers but I think that nobody give me the right answer.
Once more:
I do not implement and Custom action to create these registry settings. These settings creates installer by itself. I just want to mention that installer leave only keys which have path generated by custom action of type 35 - set directory name.
I also do not have any custom action to remove those keys because, as I said before, installer creates them by itself and I have no control over them.
Do know anybody how to solve my problem?
Thanks in advance.
Andreo
Once more:
I do not implement and Custom action to create these registry settings. These settings creates installer by itself. I just want to mention that installer leave only keys which have path generated by custom action of type 35 - set directory name.
I also do not have any custom action to remove those keys because, as I said before, installer creates them by itself and I have no control over them.
Do know anybody how to solve my problem?
Thanks in advance.
Andreo
Posted by:
aek
15 years ago
Posted by:
jmcfadyen
15 years ago
Posted by:
AngelD
15 years ago
Posted by:
anonymous_9363
15 years ago
Really? I guess that would be true if the RemoveRegistryValues action were conditioned, but it isn't by default, is it?
My reading is that during an installation, it will remove registry values authored in the RemoveRegistry table if the associated component will be installed. During an uninstall, it will remove registry values associated with components to be uninstalled.
My reading is that during an installation, it will remove registry values authored in the RemoveRegistry table if the associated component will be installed. During an uninstall, it will remove registry values associated with components to be uninstalled.
Posted by:
AngelD
15 years ago
Hi Ian,
Always nice to have a discussion with you [;)]
Allthough I havn't used the RemoveRegistry table for a while so I can't confirm on a proof-of-concept (and don't have the time to test it right now) but according to the SDK:
Remarks
The registry information is deleted from the system registry when the corresponding component has been selected to be installed locally or run from source.
Always nice to have a discussion with you [;)]
Allthough I havn't used the RemoveRegistry table for a while so I can't confirm on a proof-of-concept (and don't have the time to test it right now) but according to the SDK:
Remarks
The registry information is deleted from the system registry when the corresponding component has been selected to be installed locally or run from source.
Posted by:
jamsek19
15 years ago
Thanks for all replays fellows.
But my opinion is still that I'm not responsible for those registry keys.
Those registry keys are not created by somekind of Custom Action I implemented!
Registry keys, which I created during installation are removed. Also, I do not talk about folders. They're removed by installer after uninstall, too.
So, I'm talking about registry keys which installer creates in its database (which is by the way in registry under HKLM\Software\Microsoft\Windows\CurrentVersion\Installer) during installation.
What I was able to found out is, that those leaved registry keys points to folders which names are composed (not folders are created!) by Custom Action of type 35. Other folders which names are composed by regular installer properties are removed as well.
I'm not agree with suggestion to use RemoveRegistry table. Why should I use it if I do not create those keys?
Any suggestion?
Thanks in advance.
Andreo
But my opinion is still that I'm not responsible for those registry keys.
Those registry keys are not created by somekind of Custom Action I implemented!
Registry keys, which I created during installation are removed. Also, I do not talk about folders. They're removed by installer after uninstall, too.
So, I'm talking about registry keys which installer creates in its database (which is by the way in registry under HKLM\Software\Microsoft\Windows\CurrentVersion\Installer) during installation.
What I was able to found out is, that those leaved registry keys points to folders which names are composed (not folders are created!) by Custom Action of type 35. Other folders which names are composed by regular installer properties are removed as well.
I'm not agree with suggestion to use RemoveRegistry table. Why should I use it if I do not create those keys?
Any suggestion?
Thanks in advance.
Andreo
Posted by:
anonymous_9363
15 years ago
This is bizarre! You asked how you could remove the keys in question. We told you. Now you're asking why you should be responsible for removing them? Who cares?!?
If you want them removed, use the RemoveRegistry table. If you don't want them removed, forget about them. How much simpler could it be?
If you want them removed, use the RemoveRegistry table. If you don't want them removed, forget about them. How much simpler could it be?
Comments:
-
How about coming down off your high horse a little bit VBScab. I'm having the same problem Andreo is having. I've been using the REG DELETE command in a .bat file to remove some registry keys, but this one won't go:
REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders /v "C:\Program Files\UltraVNC" /f
How about telling us why that doesn't work instead of pointing us to a web site? - virtualwolf 8 years ago-
How about doing things the correct way instead of trying to bodge it? Use the RemoveRegistry table.
Also, you may have not noticed that this forum doesn't arrange its posts by date so reviving a thread from 2008 guarantees you pretty much zero chance that anyone else will respond to it unless they stumble across it. - anonymous_9363 8 years ago-
Like I said...Why don't you come down off your high horse? What good is the RemoveRegistry table link if you don't explain how to use it in this particular situation? As far as being from 2008 who cares? Information is still relevant. Look who replied below, the OP, and he's more help than you. People come to these boards to get help, not be degraded. BTW It's botch...not bodge.
Thanks to jamsek19 for replying with some help. :-) - virtualwolf 8 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.