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 136537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:57:51+00:00 2026-05-11T06:57:51+00:00

I wand to construct an MSI which, in its installation process, will deploy itself

  • 0

I wand to construct an MSI which, in its installation process, will deploy itself along with its contained Files/Components, to the TargetDir.

So MyApp.msi contains MyApp.exe and MyAppBootstrapperEmpty.exe (with no resources) in its File Table.

The user launches a MyAppBootstrapperPackaged.exe (containing MyApp.msi as a resource, obtained from the internet somewhere, or email or otherwise). MyAppBootStrapperPackaged.exe extracts MyApp.msi to a temp folder and executes it via msiexec.exe.

After the msiexec.exe process completes, I want MyApp.msi, MyBootstrapperEmpty.exe (AND MyApp.exe in %ProgramFiles%\MyApp folder so MyApp.exe can be assured access to MyApp.msi when it runs (for creating the below-mentioned packaged content).

MyAppBootstrapper*.exe could try and copy MyApp.msi to %ProgramFiles%\MyApp folder, but would need elevation to do so, and would not allow for its removal via Windows Installer uninstall process (from Add/Remove Programs or otherwise), which should be preserved.

Obviously (I think it’s obvious – am I wrong?) I can’t include the MSI as a file in my Media/CAB (chicken and egg scenario), so I believe it would have to be done via a Custom Action before the install process, adding the original MSI to the MSI DB’s Media/CAB and the appropriate entry in the File table on the fly. Can this be done and if so how?

Think of a content distribution model where content files are only ever to be distributed together with the App. Content is produced by the end user via the App at run time, and packaged into a distributable EXE which includes both the App and the content.

MyApp’s installer must remain an MSI, but may be executed by a Bootstrapper EXE. The installed MyApp.exe must have access to both MyApp.msi and EXE is to be ‘assembled’ at runtime by the App from a base (empty) MyAppBootstrapper.exe, which is also installed by the MSI, and the content created by the end-user. The EXE’s resource MSI must be the same as that used to install the App which is doing the runtime packaging.

WIX is not to be installed with MyApp.

There can be no network dependencies at run-/packaging- time (i.e. can’t do the packaging via a Webservice – must be done locally).

I am familiar with (and using) Custom Actions (managed and unmanaged, via DTF and otherwise).

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T06:57:51+00:00Added an answer on May 11, 2026 at 6:57 am

    Add an uncompressed medium to your wxs like this:

    <Media Id='2'/> 

    And then create a component with a File element like this:

    <File Source='/path/to/myinstaller.msi' Compressed='no' DiskId='2' /> 

    This will make the installer look for a file called ‘myinstaller.msi’ on the installation medium, in the same folder as the msi that is being installed. The source path above should point to a dummy file, it is only there to appease wix.

    Edit: The following sample test.wxs demonstrates that it works. It produces a test.msi file which installs itself to c:\program files\test. Note that you need to put a dummy test.msi file in the same folder as text.wxs to appease wix.

    <?xml version='1.0' encoding='utf-8'?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>    <Product          Name='ProductName'          Id='*'          Language='1033'          Version='0.0.1'          Manufacturer='ManufacturerName' >       <Package             Keywords='Installer'             Description='Installer which installs itself'             Manufacturer='ManufactererName'             InstallerVersion='100'             Languages='1033'             Compressed='yes'             SummaryCodepage='1252'/>        <Media Id='1' Cabinet='test.cab' EmbedCab='yes'/>        <Media Id='2' />         <Directory Id='TARGETDIR' Name='SourceDir'>          <Directory Id='ProgramFilesFolder'>             <Directory Id='TestFolder' Name='Test' >                <Component Id='InstallMyself'>                   <File Source='./test.msi' Compressed='no' DiskId='2' />                </Component>             </Directory>          </Directory>       </Directory>        <Feature             Id='Complete'             Display='expand'             Level='1'             Title='Copy msi file to program files folder'             Description='Test'>           <ComponentRef Id='InstallMyself' />       </Feature>     </Product> </Wix> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 104k
  • Answers 104k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would be very reluctant to try and directly invoke… May 11, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer Google found this: http://code.google.com/p/sonicread/. Haven't tried it myself. May 11, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer Well, I guess it's a matter of personal preference... If… May 11, 2026 at 8:34 pm

Related Questions

I have a JLabel (actually, it is a JXLabel). I have put an icon
I have a C# application that is a client to a web service. One
Is it particularly bad to have a very, very large SQL query with lots
In case of integer overflows what is the result of (unsigned int) * (int)

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.