/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (13)

Posted by: jamsek19 8 years ago
Orange Senior Belt
0
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,
Posted by: anonymous_9363 15 years ago
Red Belt
0
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
Red Belt
0
First it's Windows Installer that creates these registry information (Windows Installer metadata) and should be removed automatically by WI during uninstall if the folders are removed during this action.
It seems that the CA isn't working correctly during uninstall thus leaving the metadata behind.
Posted by: anonymous_9363 15 years ago
Red Belt
0
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.
Posted by: jamsek19 15 years ago
Orange Senior Belt
0
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
Posted by: anonymous_9363 15 years ago
Red Belt
0
Er, yes we did. Re-read the replies.
Posted by: aek 15 years ago
Purple Belt
0
those keys because, as I said before, installer creates them by itself and I have no control over them.

If there are just a limited number of regkeys, create a batch file and add commands to delete the regkeys
REG DELETE HKLM\Microsoft\Windows\CurrrentVersion\Unistall\{KEYNUM} /f
Posted by: jmcfadyen 15 years ago
5th Degree Black Belt
0
no offence AEK but dont follow the previous posts advice.

As VBScab mentioned the removedRegistry table is the better approach.
Posted by: AngelD 15 years ago
Red Belt
0
John,

I don't think Ian's suggestion regarding RemoveRegistry table will work as it will remove during install and the OP wants the registry to be removed during uninstall.
Posted by: anonymous_9363 15 years ago
Red Belt
0
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.
Posted by: AngelD 15 years ago
Red Belt
0
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.
Posted by: jamsek19 15 years ago
Orange Senior Belt
0
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
Posted by: anonymous_9363 15 years ago
Red Belt
-1
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?

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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ