View Full Version : start an EXE file

07-22-2004, 06:37 AM
Hello folks,
I got a question to the new InstallShield X.
I want to start a exe-file -before- the first install dialog is displayed, means before the welcome screen appears.
Here now the questions:
1.) How can I realize that ?
2.) How and where (in the code) do I have to define that ?
3.) What is the dir called in that is the setup.exe and the other EXE-file I wanna start ? (is it sourcedir or something?)

I hope you can answer me. Thanks in forward.

07-22-2004, 01:48 PM
I beileve you can create a custom "run exe" action that you can sequence in the Install UI sequence before the welcome screen.

Here is the info you need on the dir from help:

InstallShield X

SETUPEXEDIR is a property that contains the path to Setup.exe. For example, if the path to Setup.exe is C:\MySetups\MyApp\Setup.exe, the value of SETUPEXEDIR is C:\MySetups\MyApp.

SETUPEXEDIR is an alternative to the directory identifier SourceDir. A potential problem with using SourceDir is that it points to the location of the running MSI package. In the case of a compressed setup, the MSI package is streamed to a temporary location and run from there. Because of this, SourceDir's value will be some temporary location on the end user's machine, which might not be the value you want.

Limitations of SETUPEXEDIR
There are two limitations to using SETUPEXEDIR:

SETUPEXEDIR is set by Setup.exe. If the end user runs the MSI package directly, SETUPEXEDIR is not set. To account for this, you could have a dual implementation in your setup—one that uses SETUPEXEDIR and one that uses SourceDir. You could test for the existence of SETUPEXEDIR and, if it does not exist, you could conditionally use your SourceDir implementation.
SETUPEXEDIR might not be set on uninstall. If the end user triggers the uninstallation by running Setup.exe, SETUPEXEDIR is set. If they run the uninstallation from the Add/Remove Programs applet, SETUPEXEDIR is not set.

07-23-2004, 06:52 AM
At first Thanks a lot :)

Originally posted by PilotBob
[B]I beileve you can create a custom "run exe" action that you can sequence in the Install UI sequence before the welcome screen.

Unfortunately I'm new in InstallShield InstallScripting. Of course I tried to do it on my own but it failed :(
So where do I have EXACTLY to write the run action ?
And what have I to type in, means how does the "run action" look ?

Thanks in forward.


07-23-2004, 07:54 AM
I have to apologize... I thought I was in the Windows Installer thread. At least in that project type, Custom Actions is one of the IDE Views under the Behavior and Logic node.

You can create a new one there... One of the types of custom actions is "Exe" type which will run an exe. Then you can "Sequence" when it runs.

But, I have to admit I don't know if this pane is available in an InstallScript type project... I always do windows installer (Basic MSI) projects.

Sorry if I lead you astray.


07-23-2004, 11:28 AM
No problem.
But why do you use Windows Installer ? I never understood why to choose a setup type for that you have to attach always the windows installer runtimes (not if they are installed of course).

But what has Windows Installer that normal InstallShield installation not has got ?

07-23-2004, 11:37 AM
Basically, because I can do almost anything I want to do without writting scripts. Windows installer is all table driven.

I have a fairly complex Web application install I did with it, and I only had to write a small VB script to update the web.config XML file cause InstallShield doesn't seem to support updating XML files.

You can also just distribute the .MSI... most windows PC's these days have Windows installer on them. If not, they can download it and install it first. Of course, you can ship with the setup.exe which will install windows installer automatically. It can get it from your source media or the web.

Also, MSI supports merge modules and objects where as if you use InstallScript and you want to use a mergemodule it actually creates a "merge module object" which is really an embeded .MSI in your install, so Windows installer is needed for this. Many dev tools and other third party products provide MSMs but not install Objects cause msm is what Windows Installer supports.

But, to each his own.


07-24-2004, 05:48 AM
yes. well, I think this features doesn't need the normal little developer :) But you're right. :)
I would do a windows installer project as well, but the size does matter for me.
But a last question: how much MBs do the runtimes, when I attach them, take ?

(sorry for the bad English, I'm german ;) )

07-24-2004, 08:02 AM

I only include the NT/2000/XP version, cause that's all my app supports. The install (instmsiw.exe) is 1.7 mb. I would guess the 98/ME version is about that size too.

Once again, we ship on CD, so it's not really an issue. And, with upgrades we know that they already have the installer so we don't have to ship it if we do a web package.

BTW: Your English is fine. Much better than my German.