2

Environment: Windows 7 64, Visual Studio 2013

Prior to running iexpress I have a setup file that references a main msi, and a prerequisite msi (SlimDX). When the visual studio installer adds the prerequisite, it adds places the prereq msi in a subfolder next to setup.exe.

Now I'm using iexpress.exe to merge the setup.exe and 2 msi files. When iexpress extracts the 3 files to the temp folder, the redistributable is not in a subfolder despite the setup file still expecting it in a subfolder.

How can I force iexpress to maintain folder structure when extracting? Alternatively, when adding a prerequisite to a visual studio installer, how can I force it to place dependencies at the same folder level as the setup.exe?

SDE file

[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=1
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=I
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
TargetName=C:\Jobs\NME\Installer\Release\NMEInstaller.EXE
FriendlyName=NME Installer
AppLaunched=setup.exe
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="NME Installer.msi"
FILE1="setup.exe"
FILE2="SlimDXRedistributable\SlimDX Runtime .NET 4.0 x64 (January 2012).msi"
[SourceFiles]
SourceFiles0=C:\Jobs\NME\Installer\Release\
SourceFiles1=C:\Jobs\NME\Installer\Release\SlimDXRedistributable\
[SourceFiles0]
%FILE0%=
%FILE1%=
[SourceFiles1]
%FILE2%=
Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
Brandon
  • 1,058
  • 1
  • 18
  • 42

2 Answers2

2

My understanding is that MSFT no longer recommends or supports the use of IEXpress.exe as it contains a number of security vulnerabilities that were never patched. You really should consider switching over to a proper bootstrapper such as Windows Installer XML's Burn feature. It's easier to implement and far more powerful.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • While I don't at all disagree, do you have a reference for this? – fission Sep 11 '15 at 06:51
  • http://seclists.org/fulldisclosure/2013/Oct/5 – Christopher Painter Sep 11 '15 at 10:23
  • http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Create-Single-installable-exe-td7596297.html – Christopher Painter Sep 11 '15 at 10:26
  • It’s not really much of a vulnerability – the one you linked wasn’t even accepted as such by Microsoft. It involves a version of IExpress from 2003/XP, not anything recent. (Again, I’ll stress that I don’t disagree about your recommendation to use something else, though.) – fission Sep 12 '15 at 09:38
  • And by the way, in case you weren't aware, IExpress uses `CreateProcess`, which reads `cmd.exe` from `System32` before it even looks at `%path%`. Unless you somehow think you can predict exactly which directory a user runs the install package from, there’s really no way to inject a different `cmd.exe`. (And how would you even get it there?) – fission Sep 12 '15 at 12:13
0

I answered a question similar to this before:

Essentially you want to use a batch file (or something) to copy or move the files where you need them before executing the actual setup.exe, something like:

@echo off
mkdir SlimDXRedistributable
move /y "SlimDX Runtime .NET 4.0 x64 (January 2012).msi" SlimDXRedistributable
setup.exe

Remember if you're using a batch file to call it like:

cmd /c myscript.bat

(If you just put the batch file, it will run via the old command.com, which is suboptimal.)

fission
  • 1,170
  • 18
  • 35
  • you should vote to close or flag as a duplicate **not** re-answer the question –  Sep 15 '15 at 02:05