View Full Version : copying files to Disk1 directory (with Setup.exe)

04-11-2002, 08:44 AM
I want to include a ReadMe file at the highest level of the install "disk" automatically so that the user can see it at the top level of the cd. Is there a way to add a component to this directory (same directory as Setup.exe and the msi file)? The option to install a component to <ISProjectDataFolder> doesn't come up, and I also tried using the DuplicateFile table and copying the file to SOURCEDIR or SRCDIR. There has to be an easy way to do this, doesn't there? Seems like a lot of people would want to do this without having to do it manually.


04-15-2002, 01:21 PM

I would suggest clicking on Step 5 - Setup Files/Billboards and place this file under Disk1. This will ensure it's placed on the root of your build media.

04-17-2002, 11:53 AM
I need to copy a file from the Disk1 directory into my targetdir using installscript, but I can't find a system variable anywhere in the help to indicate how I would access the directory that the installation is being run from.

04-17-2002, 11:57 AM
Two for you: SRCDIR and SRCDISK.

Hope it helps

04-17-2002, 12:01 PM
Thanks for the quick reply, but SRCDIR is the temp directory that the MSI and the normal Setup Files are installed to. The help says that anything in the Disk1 list is not copied over, and in my tests the INI I'm trying to copy does not exist in SRCDIR, only in the directory from which the setup is being run.

04-17-2002, 12:08 PM
Sorry! I misunderstood, what you want is SUPPORTDIR.

04-17-2002, 12:20 PM
Hmm.. my install is showing SUPPORTDIR as the temp directory too. Could be that's where the MSI is extracted and run from, so SUPPORTDIR gets reset from where setup.exe was run?

Here's a more detailed outline of what I'm doing:

My media is Web format so the CABs etc are downloaded during install. We need to create affiliate downloads that include a different INI setting, so I'm going to package the setup.exe with the INI file that I'm putting with the disk1 files. Everything else is getting downloaded by setup.exe.

When I run the setup from the dir on my hard disk, it downloads the MSI and runs the setup, but SUPPORTDIR and SRCDIR are set to a temp directory that contains license.txt but not my INI.

I need to access that INI in my installscript to copy it from the directory the installation was run from to the targetdir. This was easy under ISPro6, as SRCDIR referred to the DISK1 dir containing the INI and setup.exe, but I can't seem to find the appropriate directory now in Developer.


04-17-2002, 01:37 PM
I am not sure I understand but anyway...

You have to drop your ini via the IDE using 5) Customize Functionality - Setup Files/Bilboards -- Disk 1 (or setup files)

Then, in IScript you can do something like:

LanchAppAndWait("notepad.exe", SUPPORTDIR ^ "My.ini",, WAIT);

or whatever...

It is the same way as in 6.x...

04-17-2002, 03:09 PM
That's what i've done, but SUPPORTDIR doesn't show
the directory that contains setup.exe and blah.ini, it shows the temp directory (same as SRCDIR).

04-17-2002, 03:18 PM
Don't know what to tell you. That's the way I do when I need something from SUPPORTDIR.

In fact, I have a situation, with an INI file in SUPPORTDIR (placed there thru the IDE) that we manually change so the MEDIA doesn't need to be regenerated when we need to direct the INSTALLDIR to a test or a production server.

07-18-2002, 08:44 AM
Then you're looking for the SetupExeDir property. You'll have to use MsiGetProperty to access it through a script, though.

Something like

MsiGetProperty (hMSI, "SETUPEXEDIR", svName, nvSize);

should work.

The only problem is that property will not be set if the user runs the .msi file instead of the setup.exe. It also might not be set during uninstall, depending again on how it's run.