dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Error '1638' / Another version of the product is already installed

  1. #1
    Join Date
    Oct 2006
    Posts
    11

    Error '1638' / Another version of the product is already installed

    Hello All,

    I have created windows installer application, now when I upgrade the same I get following error “Another version of the product is already installed. Installation of this version cannot continue. To configure or remove the existing version ...use add remove program in control panel”.

    I changed the version number but still I get the error.. I even tried changing the product code and set removepreviousversion property to true but still no luck.. can any one put some light to the same please??

    One instance what happens is, if I try install my application through code (i.e open the solution in .net 2005 and try to install, it automatically removes older version and installs newer version) but if I directly click on windows installer package (MSI/setup) file I get the error. I checked the error log I have this message MsiInstallProduct returned '1638'.

    It will be great help if any one puts some light on it. This is preety Urgent...

    Thanks in Advance,

  2. #2
    Join Date
    Jan 2006
    Posts
    293

    Re: Error '1638' / Another version of the product is already installed

    have you removed the program? There is a property in the installation project (Remove previous versions or something like that) to where you can change the value to not get this error. But remember, even if you change it and try to run the installation, the previous build that you installed still has the old information in the installation, and I think that is why it is still pulling up. Remove the old installation, change the property on the new installation. Install the new installation, then change the version again, rebuild and install and see if you still get that error.

  3. #3
    Join Date
    Jun 2007
    Posts
    1

    Re: Error '1638' / Another version of the product is already installed

    Hi,

    R u find solution for ur problem. If so plz guide me. Now I am also facing the same problem.



    Quote Originally Posted by TejuS
    Hello All,

    I have created windows installer application, now when I upgrade the same I get following error “Another version of the product is already installed. Installation of this version cannot continue. To configure or remove the existing version ...use add remove program in control panel”.

    I changed the version number but still I get the error.. I even tried changing the product code and set removepreviousversion property to true but still no luck.. can any one put some light to the same please??

    One instance what happens is, if I try install my application through code (i.e open the solution in .net 2005 and try to install, it automatically removes older version and installs newer version) but if I directly click on windows installer package (MSI/setup) file I get the error. I checked the error log I have this message MsiInstallProduct returned '1638'.

    It will be great help if any one puts some light on it. This is preety Urgent...

    Thanks in Advance,

  4. #4
    Join Date
    Sep 2007
    Posts
    1

    Re: Error '1638' / Another version of the product is already installed

    I came across this thread when I was tearing my hair out trying to solve the same removePreviousVersion problem.

    http://www.eggheadcafe.com/software/...rsion-sti.aspx

    it appears that if a version number is less than 1, removePreviousVersion won't work...I changed my version number to 1.x.x.x (changing product code and keeping version code the same) and it works great.

  5. #5
    Join Date
    Nov 2008
    Posts
    1

    Smile Re: Error '1638' / Another version of the product is already installed

    To whom it may concern,
    Take the following setup actions when trying to install new version:

    1. On Install project, config the following:
    DetectNewerInstalledVersion = true
    Install AllUsers = true
    RemovePrevousVersions = true

    2. Before each build, change the Install package version (1.0.0 to 1.0.1), which will require a new product code, click ok for a new code.

    3.Navigate to your main project properties->application->assembly information and change the assembly version (1.0.0.0 to 1.0.0.1), click ok, Save and build both you main and install projects.

    The reason for the "Another version of the product is already installed" prompt is because your trying to install a version with the same product code. Execute due deligence when doin a new build so it will be defined as it's own new version. Hope this helps..
    Thanks,
    Snappy

  6. #6
    Join Date
    Mar 2009
    Posts
    1

    Re: Error '1638' / Another version of the product is already installed

    Simply put: if you change the content of the MSI package you need to change the product code as well.

    You do not need to change the version of the package, just go to Properties -> Product Code and change the GUID to a new one.

  7. #7
    Join Date
    Aug 2009
    Posts
    1

    Re: Error '1638' / Another version of the product is already installed

    Sorry this is not a solution, but more of a question in this thread.
    In VS 2008, if I do not rebuild the app, and just rebundle (creating my msi file), I get the Repair option when installing, just what I want. So... obviously my bundle has the same Product Code. If I recompile and rebundle, then what do I have to change to avoid the uninstall requirement? In my vdproj file the ProductCode, PackageCode, and UpgradeCode are unchanged from my previous build/bundle. I can't get past Windows requiring me to first uninstalling my app before I can install the upgrade. Thanks for your time.

  8. #8
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Error '1638' / Another version of the product is already installed

    Use Click Once Deployment, and it will take care of things for you. Here's an old example that will display the files in YOUR root folder in a message box when you click the button to RUN the app. Notice that it doesn't get installed on your app. It's only available while I allow it. That's another option. It can be installed. Another issue is when you try to install into more than one physical location.
    Last edited by dglienna; August 20th, 2009 at 09:54 PM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)