Solved

MSI (windows installer) installation using VSI (Visual Studio Installer) and Orca... Minor upgrade question...

Posted on 2004-04-30
4
6,538 Views
Last Modified: 2013-11-14
First off, I could not find a channel dedicated to installation authoring, so I thought this channel would do!

Here is the scenario:

VB6 app:       app.exe
activex dll:     app.dll
3rd party dll:  dll.dll
3rd party ocx: ocx.ocx

I have created, in Visual Studio Installer 1.1, a .msi file for my app.  

I am deploying to 4 OS's:
WinXP
Win2K
Win98
WinNT 4.0

I have the installation package setup as such:
app.msi
Autorun.inf
InstMsiA.exe
InstMsiW.exe
setup.exe
setup.ini

For those not familiar:

-  The .msi is the package.
-  The Autorun.inf is for when I burn a CD, when that cd is put into the drive, it auto runs the setup.exe.  The contents of the Autorun.inf file is:
[autorun]
OPEN=setup.exe

-  The setup.ini contains:
[MSILoader]
MSIFileName=AEEDT.msi

-  The InstMsiA.exe and InstMsiW.exe files are for loading the Windows Installer on an OS (that doesn't already have it, usually Win98 and NT 4.0) in order to install the .msi package.

- If I had more time, I'd describe the steps involved in authoring the .msi in VSI, but that is a topic for another day...

Here is the issue:
The original installation works fine on all OS's.  No issues there (anymore!).  But, today's challenge is to code subsequent installations so that they will replace a previous installation of the same app.  So far, the only thing that has changed in the VB project is the .exe.

After much research, I've acquired a copy of Orca (an editor for .msi tables), added an Upgrade Table, and added to the Upgrade Table fields the following:

Upgrade Code:  {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}  (I used the actual upgrade code from product information tab in the VSI project properties)
Version Min:  3.0.3.0
Version Max:  3.0.4.0
Language:  null
Attributes:  772
Remove:  null
ActionProperty:  FindRelatedProducts

The Attributes value of 722 is the sum of the following:
msidbUpgradeAttributesIgnoreRemoveFailure - 4  - Continue installation upon failure to remove a product or application.  
msidbUpgradeAttributesVersionMinInclusive - 256  - The range of versions detected includes the value in VersionMin.
msidbUpgradeAttributesVersionMaxInclusive - 512  - The range of versions detected includes the value in VersionMax.

In the original package, the (Product) version is 3.0.3.0, and in the second package it is 3.0.4.0.  Likewise with the two .exe's.
Before building the second .msi in VSI, I left the Upgrade Code the same, but changed the Product Code.

Now, when running both installs, the second does not prompt for upgrading the first, it just does a new install.  So, the first installation is not replaced, and there are two entries in Add/Remove programs.  

What I'd like to happen is that the second install (and subsequent installs) will prompt to remove or upgrade the previous.  Also, if the same exact installation package is run twice, the second running of the same package should detect and notify....

I think that maybe the Remove and/or ActionProperty is not set properly, or that I need more than one row in the Upgrade Table...

Thanks in advance for any help.  Please let me know if I need to provide further info or clarification.

Preece
0
Comment
Question by:Preece
  • 2
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
hes earned 125 total points
ID: 10963151
0
 
LVL 12

Author Comment

by:Preece
ID: 10964888
Thanks, the second article, I think, is exactly what I'm looking for.  I've worked on it a bit, but will finish up on Monday!  Have a great weekend...

Preece
0
 
LVL 20

Expert Comment

by:hes
ID: 10965207
Hope it works.
0
 
LVL 12

Author Comment

by:Preece
ID: 10996818
Thanks Hes!  The second MS kb article worked great!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
sumHeights2  challenge 7 76
triangle challenge 4 77
array6 challenfge 6 62
Image decoding from Camera 3 44
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now