Product Code, Upgrade Code, Revision Code and Package GUID

Got a problem you cannot solve? Try here.
tobyteel
Posts: 10
Joined: Tue Jan 04, 2011 5:19 pm

Product Code, Upgrade Code, Revision Code and Package GUID

Postby tobyteel » Thu Feb 03, 2011 3:33 pm

So I'm running into the same problem noted in this topic: a Network error occurred while attempting to read the file (viewtopic.php?f=2&t=5609&start=0). That topic mentions the product code and the revision code as possibles source of this issue.

Here's some background: I built a crappy installer using Visual Studio's installer project, and now we're trying to move to a more functional platform (IA). Users are already using my existing VS Install project installer, so when I install our new version with the new IA installer I need to remove the old version.

I have a few questions on how to proceed:

1) Should the product code change or remain the same between the two installers? It's hard to tell from the topic mentioned above whether changing product and revision codes fixes the issue or causes it.
2) If I'm changing product codes, should I set the field labelled either "Upgrades Product with Product Code" or just "Upgrade Code" to the old installer's product code?
3) What about the NEEDSUPGRADE variable? It seems this is set when any software is installed with the same product code, but a different revision code. Is this correct?
4) MSI Package GUID: In my auto-generated .NET installer, I have code like below:

Code: Select all

  if Variable NEEDSUPGRADE Equals TRUE
    Install/Remove MSI Package {C9A46F4D-9C9A-4B07-90B4-74112566C13C}[REMOVE=ALL]
  end

How is Package GUID determined? I can't seem to find package GUID as a setting in my InstallAware project. When does this value change? This value does not match the value I see in Orca when I look at my old installer, so I assume this is the value InstallAware gave my new installer when I created it.

Strangely, I only get the error mentioned above in Vista and Windows 7; Windows XP uninstalls the old version without any issues.

Thanks in advance for the help.

-Toby

tobyteel
Posts: 10
Joined: Tue Jan 04, 2011 5:19 pm

Re: Product Code, Upgrade Code, Revision Code and Package GU

Postby tobyteel » Thu Feb 03, 2011 4:12 pm

I am super confused.

I opened my old installer in Orca, and going to View-->Summary Information... displays a Package Code, which doesn't match any other code I seem to have in the VS project (not the Product Code or the Upgrade Code; I couldn't find the revision code). Also, this isn't the code you inter into Install/Remove MSI Package anyway (despite the field requested being called "Package GUID").

Also, I must have added the lines of code above, because I see a separate section in prereqs for uninstalling the previous version:

Code: Select all

  if Variable NEEDSUPGRADE Equals TRUE
    Set Variable REMOVEOLD to
    Set Variable ERROROLD to
    Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
    if Variable REMOVEOLD Equals ERROR
      MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. Please uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$ERROROLD$
      Terminate Installation
    end
    if Variable REMOVEOLD Equals REBOOT
      MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
      if Variable REBOOTNOW Equals OK
        Reboot Computer and Resume Setup
        else
        Terminate Installation
      end
    end
    Set Variable MAINTENANCE to FALSE
  end



So I think I'm getting closer to the root of my issue. I also think the Package GUID from the code I mentioned in my previous post was just, well, wrong (it may have referred to a version of the software that was never released, I'm not sure).

-Toby

tobyteel
Posts: 10
Joined: Tue Jan 04, 2011 5:19 pm

Re: Product Code, Upgrade Code, Revision Code and Package GU

Postby tobyteel » Thu Feb 03, 2011 4:13 pm

I'm still interested in a more detailed breakdown of what all these codes are though, for those MSI/IA gurus out there.

-Toby

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Product Code, Upgrade Code, Revision Code and Package GU

Postby giaviv » Fri Feb 04, 2011 5:20 pm

Dear Toby,

It is quite confusing. The View -> Summary section in Orca does not refer to what you refer to as your product code (AKA the value you use to remove the program with our (Un)Install MSI Setup or with msiexec). Here is what you need to do to get to the actual value:
Open your MSI package in Orca. From the left-hand side menu, select the Property table. Scroll that table on the right-hand side view until you get to the property Product Code - that value has the GUID product code of the MSI setup package. Using the code, you can uninstall your package with (Un)Install MSI Setup.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Anderson
Posts: 6
Joined: Fri Jan 16, 2015 1:24 am

Re: change product code at runtime

Postby Anderson » Tue Jan 20, 2015 8:09 pm

i am building an installer with 3 products .. is it possible to allocate each product have its own product code, so that when i run the installer it will check if the product is installed using those
different product codes.. find the attached img... i am checking if the package is installed. how can i st the product codes at run time so that the products will have these 3 static product codes which i will use to detect the installed product..
Attachments
checkifinstalled.png
checkifinstalled.png (17.65 KiB) Viewed 23070 times

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Product Code, Upgrade Code, Revision Code and Package GU

Postby FrancescoT » Wed Jan 21, 2015 5:24 am

Dear Anderson,

instead of your approach, create 3 different projects (one for each product) and then embed their installers in a wrapper package.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Anderson
Posts: 6
Joined: Fri Jan 16, 2015 1:24 am

Re: Product Code, Upgrade Code, Revision Code and Package GU

Postby Anderson » Fri Jan 23, 2015 1:30 am

hi
How can i embed them in a wrapper package... is it possible with studio version..

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Product Code, Upgrade Code, Revision Code and Package GU

Postby FrancescoT » Fri Jan 23, 2015 1:26 pm

Of course you can with Studio Edition.

For the wrapper installer; create a project using the Blank project template, include your application installers to SUPPORTDIR and then execute your packages using the "RUN PROGRAM" or "Install/Remove MSI Package" command.

Optionally create a user interface if needed.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 112 guests