?
Solved

How can my InstallShield program detect if Microsoft Installer is required?

Posted on 2006-06-16
5
Medium Priority
?
912 Views
Last Modified: 2013-11-14
I am deploying a .NET application, and want my Installshield program to check dependencies.   They are as follows;  My.NETapplication -> .NET 2.0 Framework -> Microsoft Installer 3.0+.  I can detect if .NET 2.0 Framework is installed, but I can't figure out what to look for to make sure that MSI 3.0+ is there.  I am hoping for a solution general enough that it works for Windows XP and Windows 2000.
0
Comment
Question by:GSIJoe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 2000 total points
ID: 16923241
You can determine that by reading the version info resource from 'msi.dll'. See e.g. http://support.microsoft.com/kb/167597/EN-US/ ("SAMPLE: GetVers.exe Specifies Component FileVersion and #Version")
0
 

Author Comment

by:GSIJoe
ID: 16923716
That sounds perfectly plausible ... not sure why I didn't think of it myself.   Alas it is after 5:00 Friday, so I won't be able to check it out until Monday.  In the mean time, if someone can give hints on how to do this from within InstallShield, I will dole out some assisted points.
0
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 16927293
See http://helpnet.installshield.com/robo/projects/devstudio9helplangref/LangrefVerGetFileVersion.htm ("VerGetFileVersion") and http://helpnet.installshield.com/robo/projects/devstudio9helplangref/LangrefVerGetFileVersion_example.htm ("VerGetFileVersion Example"):

/*--------------------------------------------------------------*\
 *
 * InstallShield Example Script
 *
 * Demonstrates the VerGetFileVersion function.
 *
 * The script below calls VerGetFileVersion to retrieve the
 * version number of the Windows Notepad.  The information is
 * displayed in a message box.
 *
\*--------------------------------------------------------------*/

#define EXAMPLE_FILE WINDIR ^ "NotePad.exe"
#define TITLE_TEXT "VerGetFileVersion Example"

// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"

      export prototype ExFn_VerGetFileVersion(HWND);

function ExFn_VerGetFileVersion(hMSI)
    NUMBER nResult;
    STRING szFile, szPath, szMsg, svVersionNumber;
begin

    // Get the version number of the specified file.
    nResult = VerGetFileVersion(EXAMPLE_FILE, svVersionNumber);

    // Report the results of VerGetFileVersion.
    if (nResult = FILE_NO_VERSION) then
        szMsg = EXAMPLE_FILE + " does not contain version information.";
        MessageBox (szMsg, INFORMATION);
    elseif (nResult = FILE_NOT_FOUND) then
        szMsg = EXAMPLE_FILE + " could not be found.";
        MessageBox (szMsg, INFORMATION);
    else
        szMsg    = "The version number of %s is %s";
        SprintfBox (INFORMATION, TITLE_TEXT, szMsg,
                   EXAMPLE_FILE, svVersionNumber);
    endif;

end;

(WOW, I am really happy that I don't have to use InstallScript any more ;o)
0
 

Author Comment

by:GSIJoe
ID: 16942483
Well, I have to do use INstallShield about once every two years ... and forget most everything in the mean time!


0
 
LVL 86

Expert Comment

by:jkr
ID: 16948290
/me definitly prefers C++ ;o)
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Among others, I monitor the Windows Installer zone and Installer zone. I find that many of the questions could be answered much more quickly if a Windows Installer verbose log were submitted with the question.   However, I do not always have t…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

777 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