Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Custom Setup.exe MSI Wrapper

2 replies to this topic


  • Full Members
  • 21 posts

Posted 27 April 2009 - 16:19


I have a requirement to change the standard icon and the text you get in a Windows Explorer tooltip and Properties sheet for a Setup.exe wrapper. I can't see a way of changing anything except the Copyright (via Use my own version info) when in the InstallShield 2009 Premier IDE. Am i right in thinking that?

If so, looks like i need to build my own launcher Setup.exe. I have located some sample code in my Platform sdk folders that makes a setup.exe in

C:\program Files\Microsoft Visual Studio\Microsoft SDK\Samples\sysmgmt\msi\setup.exe

My questions:
1. does that produce the same Setup.exe wrapper logic that InstallShield would produce if i tell it to wrap my MSI?

2. Does the sdk one install msiexec on the target system if it's not there?

3. Once i have built this Setup.exe, how do i 'embed' my MSI package in it ready for deployment to users? I just want the one file to distribute.

4. Are there any better examples of launcher sourcecode than that i found above?

Many thanks

Edited by andyguest13, 27 April 2009 - 16:21.


  • Full Members
  • 522 posts

Posted 27 April 2009 - 22:29

About 3 years ago I adapted the Setup.exe source from the Platform SDK - I don't know whether a lot has changed since. Overall, it's a nice example. For instance, it has hardly a dependencies, I think it still runs on Windows NT 3.51 or Windows 95. One drawback is that it starts the installation by starting Msiexec.exe - I ended up calling the function MsiInstallProduct(), which gave me much better logging options, error handling, reboot handling etc.

About your questions:
1. No, InstallShield added some extras. For instance, InstallShields exe may show a dialog asking for the language during install. It also takes care of installing prerequisites.

2. If I remember correctly, it doesn't. So you have to do this yourself, which can get tricky: for instance, installing Windows Installer may require a reboot afterwards, so your app has to do checks whether a reboot is required, then reboot if necessary and assure that it will be restarted after that.
Another option is to limit the supported OS'es to just those systems (and/or Service Packs) carrying the correct version. In that case you adapt the Setup.exe to check for those system requirements.

3. The best way is to put the remaining files in a resource in Setup.exe. Setup.exe then extracts the resource to a temporary location.
Note that this practice is not recommended unless you explicitly do not support Repair, Modify installation or anything else that may require the presence of the original MSI - because that is no longer possible.

4. Not that I know of.

Edited by Zweitze, 27 April 2009 - 22:33.


  • Full Members
  • 532 posts

Posted 13 May 2009 - 04:05

You could try using a tool that edits the resources for the setup.exe. I think there is one called ResourceEditor.

So you can run your install shield build and then run the tool over the setup.exe to change the resource properties for setup.exe.