InstallShield LE "Another version of this product is already registered" - visual-studio-2010

I'm running into a roadblock using InstallShield LE in VS2010. The second time running the resulting setup.exe (with incremented version numbers), I get the error
Another version of this product is
already registered
By "incremented version numbers", I mean I changed the Minor Version, Build Number and Revision to larger numbers in AssemblyVersion and AssemblyFileVersion of my .exe (the DLL's are set to "1.0.*")
[assembly: AssemblyVersion("0.2.103.005")]
[assembly: AssemblyFileVersion("0.2.103.005")]
[assembly: AssemblyInformationalVersion("Alpha 0.1 - 2/8/2011")]
and also updated the Product Version in the General Information tab of the Installshield LE setup project from 0.10.0000 to 0.11.0000.
I did come across instances of this error message in other SO postings and on the manufacturer's community support forum, but did not find a solution that applies to me.

It turns out the answer is to create an entry on the Upgrade Paths tab. When you do that, InstallShield LE will present a file selection dialog. If you have the old installer, presumably you can browse to it to get information about what version you wish to be able to upgrade from. In my case I didn't have the old installer handy, so I pressed cancel and the new Upgrade Paths entry was created anyway. I then adjusted the properties of that entry to specify a minimum and maximum version for the upgrade, and everything worked as expected.
EDIT
(from #lookatmike's comment)
You also have to change the Product Version and (somewhat counterintuitively) the Product Code in the general information tab. The Upgrade Code must stay the same.

OK - This problem was driving me CRAZY - and I haven't found a perfect answer online.
So I decided I was done screwing around.
This may not be the "BEST" way to solve the problem - I'm sure there is some convoluted MSI-based way of "handling this properly" but I couldn't figure it out (I guess I'm dumb?)
Basically my installer just makes sure .NET is installed, and copies some files into the Program Files directory, adds some registry entries, shortcuts, etc.
If you have a more complex installation procedure - I'd encourage you to find the "right" answer elsewhere. But for something simple like I've got (and I suspect 95% of people struggling with this problem have) this works just fine.
First - NEVER touch "Product Code". I believe this is correct procedure for MSIs across the board... you shouldn't be changing the product code. And this solution relies on that as well.
Next - Copy the product code to your clipboard - we'll need it in a second.
Basically, we're going to tell InstallShield to ALWAYS UNINSTALL THE PRODUCT if it already exists on the machine.
If you or your partners ever run the install SILENTLY - make sure you do this in both places:
For "File Name and Command Line", enter:
msiexec /uninstall {YOUR PRODUCT CODE HERE} /passive
That's it. Now your installer will always uninstall the old version.
NOTE: THIS DISABLES ANY SORT OF "Am I running a newer version of the installer" CHECK.

I often reuse my Visual Studio projects and got this problem. As #Eric-j said I had to change the product code in the General Information tab of the VS Install Setup project:

Related

Can't get MSI minor upgrade to work

When I try and apply a minor upgrade to my application, I launch the installer and (depending upon the combination of settings I try) I get either a:
repair/remove dialog
prompt for the install directory
I don't believe I should get either of these prompts. I'm mostly expecting the installer to automatically apply the upgrade and not prompt for anything. I think I'm doing everything correctly in the Visual Studio setup project:
upgraded the version from 1.0.0 to 1.1.0
left the product code the same
updated the package code
left the upgrade code the same
launch the installer with the parameters REINSTALLMODE=vomus REINSTALL=ALL
I've tried just about every combination of codes/flags and techniques, but cannot seem to get the update applied.
Any ideas of what else I can try?
To get it to work I:
upgraded the version from 1.0.0 to 1.1.0
left the product code the same (said No when prompted by Visual Studio)
updated the package code (Visual Studio did this automatically)
did not change the upgrade code
launch the installer with the parameters REINSTALLMODE=vomus REINSTALL=ALL
Just as I had indicated in my question, and it seems to be working. I can successfully apply an upgrade. However, when I run the installer I am still prompted with a repair/remove option. But, that's a different question I guess.
Just first things first: Are you sure you haven't re-used the package GUID in both MSI files, or at some point during deployment work and testing?
Try rebuilding both MSI files with new GUIDs to "de-couple" them from any existing cached versions and then try test installing again. Change both the package code and product code. Better yet: test these new versions on a clean virtual machine to ensure a proper test environment unaffected by past sins. Your developer system could have gremlins in its Windows installer database due to package guid clashes. If this is the case package installation becomes total XFiles - the strangest things can happen.
More details:
If the package GUID is the same for two MSI files, Windows Installer will treat them as the same file by definition - no matter what they contain. This can cause all kinds of strange problems that are hard to clean up and debug. Note that this can happen even if you just forgot to update it once since installation of an MSI will cause it to be cached on the system in the C:\Windows\Installer folder (this folder is hidden and protected). This cached copy will be re-used if an MSI file with the same GUID is launched (at least this was the case for earlier versions of Windows Installer - there could be fixes for this now).
If you are using Installshield you should enable the "always generate packaging GUID" feature to ensure this never happens. Package GUID should always change for every single build - there is no reason whatsoever to keep it hard coded. I believe WIX takes care of generating the package GUID automagically, unless you specifically override it.

Duplicate entries in Add/RemovePrograms control panel when using MsiSetExternalUI

I created a setup for my product targeting Windows XP and later, to be installed using windows installer (WI). The resulting .msi file has a product code, let's say PC1 (actually a guid), and an upgrade code UC1 (also a guid). After some time, I created a new setup for a newer version of my product. The new .msi file has a new product code PC2 and the same upgrade code UC1 (also called a major upgrade). My company wants to install the .msi file with our own installer. For that, we basically use MsiInstallProduct to install the .msi file, while the entire UI is in our own install program (and we use MsiSetExternalUI to ask WI to send us notifications). The problem that I am having is the following:
if the two builds of the product are installed on the same machine using "msiexec /i myapp.msi" then there will only be one entry in the "Add/Remove Programs" of "Programs and Features" control panel applet. or in other words, during the installation of the new build, the old one is uninstalled.
if the two builds are installed on the same machine programatically using MsiInstallProduct, there will be two different entries in control panel.
Once again, only if I try to install it programatically (using either MsiOpenPackage+MsiDoAction or MsiInstallProduct), the upgrade does not happen and I end up with two entries in the control panel. I also found that if I do not set an external UI callback using MsiSetExternalUI, before calling MsiInstallProduct or MsiDoAction, then the upgrading part of a new installation also works as expected, no duplicate entries in the CP.
The callback that I use for MsiSetExternalUI is basically the same as the one in this MSDN article:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368786(v=vs.85).aspx
What can I do (or what I need to handle in my callback) to avoid having duplicate/multiple entries in control panel?
Thanks and best regards,
Levente
Re our comments above, I did a google search for CLIENTUILEVEL and the first several hits indicate to me that CLIENTUILEVEL having a null value is normal and that REMOVE=ALL is working. The comments indicate to go a little furthor down the log and find out why the uninstall (Remove existing products) is failing. If you could email me a complete log file ( chrpai#iswix.com ) I could look through it for you.
RemoveExistingProduct standard action
Link to article describing how to interpret Windows Installer log files (see comments)
RemoveExistingProducts running but not uninstalling Options
I ran into the same behavior with my ManagedMsiExec sample project: http://blogs.msdn.com/b/delay/archive/2012/01/09/make-things-as-simple-as-possible-but-not-simpler-managedmsiexec-sample-app-shows-how-to-use-the-windows-installer-api-from-managed-code.aspx
Changing the logging behavior of my app didn't help in my case. But after (independently) noticing the same "CLIENTUILEVEL= REMOVE=ALL" strangeness in the logs, I found a workaround which was to explicitly call MsiSetProperty and set CLIENTUILEVEL to 0 before calling MsiDoAction.
This appears to me to be a bug with Windows Installer itself (incorrectly setting CLIENTUILEVEL during RemoveExistingProducts), but perhaps there's something else going on I don't understand. At any rate, I've had success with this change and maybe others can, too. :)

vsFlexGridPro7 how to enter legal lic-code in Win7-64bits

I need to maintain an old vbp (vb6) project that uses the purchased videosoft vsFlexGridPro7 ocx (not the free msFlexGrid included in vb6pro).
This was working fine in WinXpPro and even in WinVista.
But my pc has crashed and now the new one runs Win7 64bits.
The original setup.exe from Videosoft (maybe using 16bits) doesn't run, and without running this setup I don't know other way to enter my legal lic code.
Then my vbp shows error (thinking I'm running the unregistered version) when running in vb6IDE or tryng to compile.
So, several related questions...
1.- any way to enter the lic codes without run setup.exe?
2- any way to run setup.exe? (not in an virtual machine....)
These grid don't use DB, "only" the LIGHT version (Vsflex7L.ocx), all code managed.
btw I think videosoft.com is closed, ComponentOne sells an version 8, but is expensive and 1.- not sure if it will be ease the conversion and 2.- if Videosoft is out of business don't appears as a good purchase.
Thanks very much in advance.
I don't think VideoSoft are "out of business". If I remember correctly they merged with another company (APEX) and changed name to ComponentOne, so you may be eligible for an "upgrade version" instead of a full new license.
We also faced exact same problem...our old VB app uses some of very old controls which are developed long time back ( 16 bit setup ). We ended up writing a installer for installing the files ( we ended up using the installsheild to create a setup) we got the list of files from original install locations ( install.txt). As far as license goes you can copy the license.bat file from original install location to c:\windows\system folder. Hope this helps.

Windows Installer - force users to remove via Add?remove Programs

We have an installer solution written in Visual Studio 2005 Installer; that calls a C# custom action and we have hit a known issue, regarding the fact that on an upgrade - the old install code is run and not the new code, because Windows is running a cached version of the custom action dll. We know this and although not over the moon about it - we have moved on.
When we release a new version of the installer and a user runs it, we now want it to check to see if an ealier version is installed - if there is one; we want to display a message telling them that they have to remove the old version via Add/Remove Programs. We know if they do a manual uninstall followed by an install, then all is fine and dandy - BUT it doesn't matter how many times we tell our users, via documentation; that this is what they have to do - they will still try and just run the new installer, without removing the old version first.
Therefore, we would like to put up a message and thus force them to to what they are told !! I've seen some installers do this ( though of course not sure what installer package was used to create these ). We only have VS 2005 and of course orca !!
Cheers,
Chris.
This can be done through a custom launch condition:
create a search which determines if the old version is installed (you can search for a component, registry entry or file)
use the search property as a custom launch condition
For example, if the search property is OLD_VERSION, the launch condition can look like this:
Condition: NOT OLD_VERSION
Description: An older version was found. Please uninstall it using "Programs and Features" in Control Panel.
When OLD_VERSION property is set to a value (an older version is found), this launch condition will show the message and stop the install process.
This doesn't quite make sense. Have you remembered to change the package GUID in your new setup? The package GUID identifies a specific setup file, and if two MSI files have identical GUID they will be treated as the same file regardless of whether they are or not. This could trigger a cached version of the MSI to be invoked and all sorts of hell breaks loose.
I would recommend reading up on "major upgrades" which will allow automatic uninstall of the existing version before the new version is installed. You also need to make sure you understand the basics of the technology before deploying to the wild. You must NEVER use identical package GUIDs for any MSI files. It's practically always wrong, and will lead to very mysterious problems.
I can't write up the whole major upgrade solution here, but basically it involves authoring the "Upgrade" table of your MSI to detect versions to uninstall. You need to change the package code, product code and version number (only 3 digits matter) and keep the same upgrade code (two MSI files with the same upgrade code "know" they are related - i.e they are from the same product family). Check MSDN for samples of major upgrades.
NB! If you have deployed MSI files with duplicate package GUIDs to your developer machine, it could have stray installs that must be cleaned up with MSIZap or similar. Use caution, or better yet test your new installer on a clean test system. Developer systems are full of junk and not generally good for MSI testing.

WiX Installer: How to switch to repair-mode if already installed?

I am new to WiX 3.0 and writing my first installer based on WiX (coming from Wise).
If the product is already installed (in the current version), I want the installer to switch to "repair"-mode automatically. It should behave exactly like as if I would have clicked "repair" in the Windows software dialog.
It must behave like this to fit in the overall installation process of the system.
I read the documentation but can't get hold of the problem...
You can use the Installed property to conditionalize a SetProperty element for REINSTALL and REINSTALLMODE properties. Be careful to test upgrades to ensure that you add the other parts of the condition (REMOVE<>"ALL") so that the upgrade of the old product stays an uninstall and doesn't flip to repair. :)

Resources