CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2008
    Posts
    20

    Installer Uninstall doesn't remove Registry

    Hi,

    I would like to remove a registry during the uninstallation. I have created this registry in the Registry section of the installer and put the property DeleteAtUninstall at True.

    As it is the program itself which has created the Registry and not the installer, I guess that's why the uninstall doesn't remove this registry.

    Is there a way to force the uninstall to delete this registry? The name and location of the key will be always the same

    Thanks for your help,

    Philippe

  2. #2
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Installer Uninstall doesn't remove Registry

    Which Installer program was used to create the Installation programr?
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    Hi,

    Thanks for your reply.
    The installer is the installer of visual studio which create msi file.
    In this installer I create this registry but put the property AlwayCreate at false, so it doesn't create the key. It is the program that is installed that create the key.
    I would like the installer/uninstaller to delete this key in the registry

    Thanks for your help,

    Philippe

  4. #4
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Installer Uninstall doesn't remove Registry

    Use RegDeleteKeyEx() in your uninstall.

    http://msdn2.microsoft.com/en-us/lib...47(VS.85).aspx
    ahoodin
    To keep the plot moving, that's why.

  5. #5
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    Hi ahoodin,

    Thanks again for your answer

    I'm not used to the uninstaller, where do I have to put this code? Is it a custom action?

    Sorry I'm new with the use of the installer
    Thanks a lot,

    Philippe

  6. #6
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    I'm using C# by the way

  7. #7
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Installer Uninstall doesn't remove Registry

    http://www.c-sharpcorner.com/UploadF...sRegistry.aspx

    Well if you still want to use the installshield to do it, perhaps you should look at the first link.

    InstallShield for vc++ 6.0 doesn't really do C#.

    The Installer generates a C like Script, and it uses some commands very similar to Windows API that infact probably wrap or call the actual API calls themselves. You will have to run the Project Wizard in the InstallShield Application to help you learn how it works. If you care to use the InstallShield.
    Last edited by ahoodin; April 25th, 2008 at 11:53 AM.
    ahoodin
    To keep the plot moving, that's why.

  8. #8
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    Thanks again,

    But how do you implement it in visual studio installer?

    Thanks,
    Philippe

  9. #9
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Installer Uninstall doesn't remove Registry

    If it is in the newer one, well which it looks like it is, there is no script, there should be a way to configure it

    Here is the way:
    http://forums.microsoft.com/MSDN/Sho...17758&SiteID=1
    ahoodin
    To keep the plot moving, that's why.

  10. #10
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    Thanks,

    I have to override the uninstall function of the installer so.
    I'm trying to see now how it works

    I have to create a class but where? and how to connect it to the installer?


    Thanks a lot for your help,

    Philippe

  11. #11
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    I think I've got something there:

    http://www.dotnet247.com/247referenc.../17/88848.aspx

  12. #12
    Join Date
    Apr 2008
    Posts
    20

    Re: Installer Uninstall doesn't remove Registry

    Not very clear though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured