Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Registry Condition property deleting the complete registry setting on uninstall, Possible Bug!!!!
 

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


This looks like a bug to me

I have a vdproj installer project.

I have set the condition property on the 2 registry entriesHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0 andHKEY_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 propertyVSBUTTONPROPERTY, this is then evaluated in the property withVSBUTTONPROPERTY=1 orVSBUTTONPROPERTY=2 respectively.

Unfortunately this seems to result in the complete entry,HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0 andHKEY_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/
learnerplates  Friday, July 31, 2009 2:12 PM
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 somewhereunder these keys?
Phil Wilson
PhilWilson  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/
learnerplates  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/
learnerplates  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 yourdata. Defining the entire key is telling the install that the entire key is yours.
Phil Wilson
PhilWilson  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/
learnerplates  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 differenceis that you need todescribe the path to your new registry item, not create a key that belongs to Visual Studio.
Phil Wilson
PhilWilson  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 differenceis that you need todescribe 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/
learnerplates  Thursday, August 13, 2009 3:27 PM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce - Deploy the same assembly to 2 different folders
• I have exe and dll. How can I use ClickOnce?
• .NET 3.5 Client Profile
• Help! Error in deployment compilation
• Where to install winapp-application and sqlexpress
• Installing ClickOnce from MSI file and Let ClickOnce do the updates through program [if configured to do so]
• Including unreferenced plugin assemblies in clickonce deployment
• visual studio setup variables
• Referenced Assembly Error???
• Change the published files once they have been deployed on the server