1

I'm having trouble creating my first self-extracting installer using IExpress.exe.

HelloWorld.bat:

echo Hello
pause

HelloWorld.SED:

[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=1
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
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:\Users\lbarnes\Documents\InstallerTest\HelloWorld.EXE
FriendlyName=HelloWorld
AppLaunched=Hello.bat
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="Hello.bat"
[SourceFiles]
SourceFiles0=C:\Users\lbarnes\Documents\InstallerTest\
[SourceFiles0]
%FILE0%=

But when I use IExpress.exe

IExpress.exe /N HelloWorld.SED
HelloWorld.EXE

I get a pop-up window with this message

Error creating process Command /c C:\Users\lbarnes\AppData\Local\Temp\IXP000.TMP\Hello.bat

Reason: The system cannot find the file specified.

That file is present as verified using

dir C:\Users\lbarnes\AppData\Local\Temp\IXP000.TMP\Hello.bat

What am I doing wrong?

Community
  • 1
  • 1
Levi Barnes
  • 357
  • 3
  • 12
  • 1
    Change the AppLaunched value to `cmd.exe /c hello.bat` – Squashman Dec 20 '17 at 03:31
  • Squashman already answered you. The reason is that IExpress was created in the the times when the default command processor was `command.com` (which is no more available in 64 bit machines) and tries to launch a bat file using it. So you need to force cmd.exe usaga with thr `AppLaunched` directive. – npocmaka Dec 21 '17 at 08:26
  • I did not specify "Command". IExpress did that. Is there a better utility than IExpress? BTW, it seems to have worked when I changed from a .bat file to a .cmd file. Maybe that enticed IExpress to use cmd.exe. – Levi Barnes Jan 12 '18 at 16:25
  • @Squashman The IExpress tool doesn't generate proper working Executable if the Batch script inherently fires up UAC for Administrator access and then continues the rest of the processing... Any idea, how can I change/tweak the .sed file to generate reliable and working executables of Self-Elevating Batch scripts / utilities ? – Vicky Dev Feb 21 '21 at 00:13

1 Answers1

0

IExpress Wizard

Add cmd /c hello.bat in the Install Program dropdown. It automatically pick only the batch file, you need to change the AppLaunched parameter as the above.

Tharindu
  • 91
  • 4