Visual studio 2010 VB Setup Project - Uninstalls wrong program
-
Visual Studio 2010 VB using the VS Setup and Deploy to create an MSI install file. 2 Similar programs uninstalling each other. We had a program running for a few years. We needed a similar program so we decided to use it a base. So The Program 1 folder was copied to create the Program 2 folder. Renames were done on the folder names and main modules. SLN file changed. The GUID in the Assembly info was changed. We can install either but when we install program 2 from the IDE it first uninstalls program 1. Same when we install Program 1 it uninstalls program 2. When we install them they both appear with the correct name in Control Panel programs but one or the other. I understand something got crossed but what? How can we fix it? Thanks
-
Visual Studio 2010 VB using the VS Setup and Deploy to create an MSI install file. 2 Similar programs uninstalling each other. We had a program running for a few years. We needed a similar program so we decided to use it a base. So The Program 1 folder was copied to create the Program 2 folder. Renames were done on the folder names and main modules. SLN file changed. The GUID in the Assembly info was changed. We can install either but when we install program 2 from the IDE it first uninstalls program 1. Same when we install Program 1 it uninstalls program 2. When we install them they both appear with the correct name in Control Panel programs but one or the other. I understand something got crossed but what? How can we fix it? Thanks
Most likely the Product Code got duplicated from the first to the second setup. Each installer must have a unique Product Code which is a GUID. I can't help you find it in Visual Studio, though, because I never use those setup projects. I use InstallShield. Try looking for the Product Code and change it in the second setup. NOTE: The Upgrade Code must also be unique for a separate product installer. If product 2 is only an upgrade of product 1, then the Upgrade Codes should be the same, otherwise they should be different.
The difficult we do right away... ...the impossible takes slightly longer.
-
Most likely the Product Code got duplicated from the first to the second setup. Each installer must have a unique Product Code which is a GUID. I can't help you find it in Visual Studio, though, because I never use those setup projects. I use InstallShield. Try looking for the Product Code and change it in the second setup. NOTE: The Upgrade Code must also be unique for a separate product installer. If product 2 is only an upgrade of product 1, then the Upgrade Codes should be the same, otherwise they should be different.
The difficult we do right away... ...the impossible takes slightly longer.
I have changed the Guid in the Assembly. I do not know where else to look. I have done this with several other programs and this is the only one giving us trouble.
-
I have changed the Guid in the Assembly. I do not know where else to look. I have done this with several other programs and this is the only one giving us trouble.
You need to change the ProductCode in the install. The GUID in the Assmebly (whichever GUID you're talking about) means nothing to the installer. I also never use the VS setup project, instead going for InstallShield.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
You need to change the ProductCode in the install. The GUID in the Assmebly (whichever GUID you're talking about) means nothing to the installer. I also never use the VS setup project, instead going for InstallShield.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakThanks Mark, I found it in Setup1.vbproj under "ProductCode" = "8:{....}" But if I change it to any other value then I cannot build the setup project and get an error Invalid product code '{...}'. Must be formatted as (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx) but it is. I compared them in notepad and they have the same format. If I put back the old (duplicate code) it compiles. Any idea?
-
Thanks Mark, I found it in Setup1.vbproj under "ProductCode" = "8:{....}" But if I change it to any other value then I cannot build the setup project and get an error Invalid product code '{...}'. Must be formatted as (xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx) but it is. I compared them in notepad and they have the same format. If I put back the old (duplicate code) it compiles. Any idea?
What did you change it to? Each of the "x" characters needs to be a hexadecimal digit - either
0-9
orA-F
. If you changed one of the characters to "x", for example, it wouldn't be valid.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
What did you change it to? Each of the "x" characters needs to be a hexadecimal digit - either
0-9
orA-F
. If you changed one of the characters to "x", for example, it wouldn't be valid.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I used GuidGen to create a new valid Guid. Tried 2 of them. I did not manually type them but copied/pasted the Guid from the GuidGen. This is the dup one that was there and works. "ProductCode" = "8:{0266BF84-C385-4430-A15A-3B5C497FCC33}" The below failed. "ProductCode" = "8:{4d787188-0f42-443d-9553-71ecbd950a29}" "ProductCode" = "8:{7FCA517C-F1D6-4e10-8837-B4C281D44428}"
-
I used GuidGen to create a new valid Guid. Tried 2 of them. I did not manually type them but copied/pasted the Guid from the GuidGen. This is the dup one that was there and works. "ProductCode" = "8:{0266BF84-C385-4430-A15A-3B5C497FCC33}" The below failed. "ProductCode" = "8:{4d787188-0f42-443d-9553-71ecbd950a29}" "ProductCode" = "8:{7FCA517C-F1D6-4e10-8837-B4C281D44428}"
What's with the "8 colon" in the strings? Those don't belong there in a GUID.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
What's with the "8 colon" in the strings? Those don't belong there in a GUID.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakI did not put it there. It is in all our VB2010 setup projects. Here is portion of a different project that works fine. "ProductCode" = "8:{DD570CBF-BEA4-42C8-B8CE-FF8CD4FB6CE8}" "PackageCode" = "8:{B00FFBD9-1D7F-4861-9BAF-422BA6C34596}" "UpgradeCode" = "8:{94029DC3-8EC2-4EB5-BA96-984C17CBD641}"
-
I did not put it there. It is in all our VB2010 setup projects. Here is portion of a different project that works fine. "ProductCode" = "8:{DD570CBF-BEA4-42C8-B8CE-FF8CD4FB6CE8}" "PackageCode" = "8:{B00FFBD9-1D7F-4861-9BAF-422BA6C34596}" "UpgradeCode" = "8:{94029DC3-8EC2-4EB5-BA96-984C17CBD641}"
Weird. Like I said, I never use the VS installer project. They don't even exist in VS2012 and above.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
I used GuidGen to create a new valid Guid. Tried 2 of them. I did not manually type them but copied/pasted the Guid from the GuidGen. This is the dup one that was there and works. "ProductCode" = "8:{0266BF84-C385-4430-A15A-3B5C497FCC33}" The below failed. "ProductCode" = "8:{4d787188-0f42-443d-9553-71ecbd950a29}" "ProductCode" = "8:{7FCA517C-F1D6-4e10-8837-B4C281D44428}"
Try making sure all the letters in the GUID are UPPER CASE.
The difficult we do right away... ...the impossible takes slightly longer.
-
Try making sure all the letters in the GUID are UPPER CASE.
The difficult we do right away... ...the impossible takes slightly longer.
That worked. THANKS!