none
Registry Condition property deleting the complete registry setting on uninstall, Possible Bug!!!!

    Question


  • This looks like a bug to me

    I have  a vdproj installer project.

    I have set the condition property on the 2 registry entries HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0 and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0 , I've set the condition evaluate when a user selects something in an input dialog i.e. vs2005 or vs2008 with this property VSBUTTONPROPERTY, this is then evaluated in the property with VSBUTTONPROPERTY=1 or VSBUTTONPROPERTY=2 respectively.

    Unfortunately this seems to result in the complete entry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0 and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0 
    being deleted at uninstall, that's unofortunate as it leaves you without Visual Studio!!!!
    By removing the condition it uninstalls without issue but this means these entries are always added at install time.

    http://learnerps-dotnet.blogspot.com/
    Friday, July 31, 2009 2:12 PM

All replies

  • What's the background here? It looks like you're attempting to create these keys, but why? They belong to Visual Studio. I guess you might be creating some extra registry entries somewhere under these keys?
    Phil Wilson
    Friday, July 31, 2009 9:24 PM
  • yes that's right, I'm adding registry entries to the Visual Studio installations already existing registry, I'm registering my VSPackage.
    It works as expected with the Condition ie. adds the registry entries each time you install and deletes the ones added on uninstall.
    e.g.
    HKLM\Software\Microsoft\VisualStudio\8.0\Packages\{83a7c0fa-4f6e-43c5-9ee4-a5938847c54a}
    HKLM\Software\Microsoft\VisualStudio\9.0\Packages\{83a7c0fa-4f6e-43c5-9ee4-a5938847c54a}

    What I want to do is only add one of these registry entries when the user selects either VS2005 or VS2008.


    http://learnerps-dotnet.blogspot.com/
    Tuesday, August 04, 2009 9:14 AM
  • I've turned on the logging and I see the folowing in th log

    MSI (s) (9C:D0) [16:12:49:951]: Executing op: RegOpenKey(Root=-2147483646,Key=Software\Microsoft\VisualStudio\8.0,,BinaryType=0)
    MSI (s) (9C:D0) [16:12:49:951]: Executing op: RegRemoveKey()

    it then carries on with my other registry entries.

    The condition I am now tesing with is 
    VSBUTTONPROPERTY <= 2

    VSBUTTONPROPERTY will have a value 1 for the VS 2005 installation, the condition is on the 8.0 registry entry.

    All other properties on this registry entry remain defaulted.







    http://learnerps-dotnet.blogspot.com/
    Tuesday, August 04, 2009 3:30 PM
  • I suspect that you're defining that entire key in the IDE in Visual Studio. I think maybe you would not see this issue if you built the key as a tree in the IDE:
    HKLM
    .....SOFTWARE
    ................Microsoft
    ..........................Visual Studio
    ..............................................8.0

    and so on in the explorer-type treeview, and then finally add your data.  Defining the entire key is telling the install that the entire key is yours.
    Phil Wilson
    • Proposed as answer by SpiderMaster Monday, August 30, 2010 1:16 AM
    Wednesday, August 05, 2009 10:11 PM
  • Phil,
    yes you're correct I'm using the complete registry in the registry designer, how else do you use it?

    There's a screen dump in my previous post of what it actually looks like.

    I'm adding entries to already existing Visual Studio registry entries, I can't see how else you'd get the correct registry entry without using the full path.

    http://learnerps-dotnet.blogspot.com/
    Thursday, August 06, 2009 12:13 PM
  • The issue is that *you* are creating the 8.0 key. That key is not yours. As I tried to explain before, it seems to me that your requirement is add something else beneath that key - not to create (and therefore install and uninstall) that key. For example, if you want to create a new CLSID entry under Visual Studio\9.0\CLSID then you do not create the Visual Studio key or the 9.0 key or the CLSID key. You specify at the bottom of the tree in the left side pane only the new guid you are creating and its content.  I know it's not obvious in the IDE, but the difference is that you need to describe the path to your new registry item, not create a key that belongs to Visual Studio. 
    Phil Wilson
    Friday, August 07, 2009 6:23 PM
  • You specify at the bottom of the tree in the left side pane only the new guid you are creating and its content.  I know it's not obvious in the IDE, but the difference is that you need to describe the path to your new registry item, not create a key that belongs to Visual Studio. 
    Phil Wilson
    Hi Phil, I did read your post, I've also read your second post but I still do not see where to add a new Key without explicitly listing the fullpath to the registry you wish to add your new key to!!
    In the properties there is a (Name) and a FullPath, the FullPath is not editable, if I try to prepend the full path to this Name it won't compile, I don't see anywhere else to set the path!
    Can you show me an screendump or something of what you're explaining.


    http://learnerps-dotnet.blogspot.com/
    Thursday, August 13, 2009 3:27 PM
  • I realize this thread is over a year old, but learnerplates, did you ever get clarification on how to implement what PhilWilson is suggesting?  I'm in the same boat you were...

     

    Tuesday, January 04, 2011 7:39 PM
  • hi, I encounte the same problem.

    the installer, created by VS2010, will delete the parent registry key while uninstall, even I have set the DeleteAtUninstall to false.

    And finnaly I fix this problem:

    for all registry, the ones your program created and its all parent,

    set the Transitive to false.

    then uninstall will not delete the parent registry, and only delete the ones your program created.

    the screenshot of settings is following:

    in my above example,

    the registry key, my program want to creat, is crifan.InsertSkydriveFiles, which is under:

    HKCU\Software\Microsoft\Windows Live\Writer\PluginAssemblies\

    so, you need set all :

    Software

    Microsoft

    Windows Live

    Writer

    PluginAssemblies

    's Transitive to False.

    and also crifan.InsertSkydriveFiles 's Transitive to False in their property.

    (only if you can read and understand Chinese, ^_^ , )you can found the more detailed explanation on my site:

    http://www.crifan.com/make_msi_installer_for_csharp_dll_project/

    • Edited by crifan Thursday, July 26, 2012 5:29 AM update link
    Sunday, March 04, 2012 4:48 PM
  • Hi there,

    I had a similar problem 2 days ago. I wanted to register a couple of 32-Bit-COM classes in the registry. AFAIK:

    On 32-Bit Systems, one has to register the classes at

    HKLM\Software\Classes\CLSID\MyClassIDs 1, 2, 3, 4, 5, 6, ...

    HKLM\Software\Classes\Interfaces\MyInterfaceIDs 1, 2, 3, 4, 5, 6, ...

    on 64 bit systems, the 32-bit-Classes must be registered at

    HKLM\Software\Wow6432Node\Classes\CLSID\MyID 1, 2, 3, 4, 5, 6, ...

    HKLM\Software\Wow6432Node\Classes\Interfaces\MyInterfaceIDs 1, 2, 3, 4, 5, 6, ...

    I used the condition property on HKLM\Software\Classes and on HKLM\Software\Wow6432Node\Classes in order to install the registry keys only in the correct path for 32/64 bit system instead of setting the condition on each single classID/interfaceID.

    The installation runs fine, after the installation, all the HKLM\Software\Classes were deleted although DeleteAtUninstall=FALSE and this of course killed my windows installation.

    Additionally, there were no restore points (known problem under Win 7) so I had to reinstall the system.

    Seems to be a very critical bug in Visual Studio Setup !!

    DONT USE THE CONDITION PROPERTY ON REGISTRY KEYS THAT ARE NOT YOURS !!!

    Cheers,

    Henning


    • Edited by Henning Friday, July 06, 2012 2:20 PM
    Friday, July 06, 2012 2:03 PM