Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7835371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:36:30+00:00 2026-06-02T13:36:30+00:00

i am currently working on Installer in inno setup and run bat file which

  • 0

i am currently working on Installer in inno setup and run bat file which check the OS version and install the window installer 4.5 if OS is window xp,now i have a problem i want to detect that is window installer 4.5 is already install or not on machine ?

there is command msiexec which popup the window to show the version but i need it as a string to make a decision is there is any way to know the currently installed window installer version in bat file?

 REM Check Windows Version
ver | findstr /i "5\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_2000
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_XP
ver | findstr /i "5\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_2003
ver | findstr /i "6\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Vista
ver | findstr /i "6\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Win7
goto warn_and_exit

:ver_XP
start WindowsXP-KB942288-v3-x86.exe
end

it is bat file now i want to check before start window installer whether the version is 4.5 or not if < 4.5 install otherwise nothing

looking for good and fast response

regards
wasif

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T13:36:32+00:00Added an answer on June 2, 2026 at 1:36 pm

    I would try something like this. You may also follow the commented version of this post:

    [Files]
    Source: "WindowsXP-KB942288-v3-x86.exe"; DestDir: "{tmp}"
    
    [Run]
    Filename: "{tmp}\WindowsXP-KB942288-v3-x86.exe"; Check: CheckInstallMSI; OnlyBelowVersion: 0,6.0
    
    [code]
    const
      // The minimum MSI version is 4.50.0.0
      MinMSIVersionMS = (4 shl 16) or 50;
      MinMSIVersionLS = (0 shl 16) or 0;
    
    function CheckInstallMSI: Boolean;
    var
      MSIVersionMS: Cardinal;
      MSIVersionLS: Cardinal;
    begin
      Result := True;
    
      if GetVersionNumbers(ExpandConstant('{sys}\msi.dll'), MSIVersionMS, MSIVersionLS) then
        if MSIVersionMS >= MinMSIVersionMS then
          Result := False;
    end;
    

    Sources:

    • Example of how to deploy shfolder.dll
    • Description of the OnlyBelowVersion parameter
    • Windows versions used by the OnlyBelowVersion parameter
    • How to determine the the Windows Installer version (MSDN)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I have the following fragment to check and install Windows Installer 4.5 if
I have a Websphere Portal application containing several portlets for which I'm currently working
We are currently working on designing the installer for our product. We are currently
On ubuntu I currently have haskell-platform 2011.2.0.1.2 installed, and I am currently working on
I am currently working on an application that requires to check whether the Opensearch
The Goal: have a working version of PHP with the GD library working on
I am currently working on NetBeans 7.0 it did not have HTML5 and CSS3
I have created a standard MSI installer for P&D of my application which is
Currently, I have a link to a powerpoint file and when you click the
I am currently working on restructuring my site's database. As the schema I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.