Page 1 of 1
Copy local file during install
Posted: Fri Aug 11, 2006 8:01 am
by MarkRichards
Hello,
I need to copy a file that's local to the installer EXE to the target installation folder, but I can't seem to get it to work properly. Here's the command I'm using:
Copy Local Files $EXEDIR$\\ClientInstall.ini to $TARGETDIR$I've also tried using $ROOTDIR$ in place of $EXEDIR$, but in either case, the file simply isn't copied. I've confirmed that the ClientInstall.ini file does indeed exist in the expected directory.
I'm using IA 5.31.
- Mark R.
Posted: Fri Aug 11, 2006 8:03 am
by MarkRichards
BTW, I should probably note that I am calling Apply Install *after* the Copy Local Files command.

Posted: Fri Aug 11, 2006 8:34 am
by MarkRichards
Ok, I understand where the problem lies now, but I'm unsure about how to solve it.
The issue is with my understanding of $EXEDIR$ and $ROOTDIR$. I assumed that if I was installing an executable from a network share (such as \\\\computer\\folder\\install.exe), these variables would be set to "\\\\computer\\folder"). But that is clearly not the case - they are set to the local temporary path of the installation exe (which certainly makes sense to me).
What I would really like to do is copy a file from the network share folder in the example I provide above. Is there any way to do this?
- Mark R.
Posted: Fri Aug 11, 2006 4:29 pm
by MichaelNesmith
What you want to do is use the $SFXPATH$ pre-defined variable. For a full list of pre-defined variables, please see the help topic titled "Pre-Defined Variables".
$SFXPATH$ will refer to the folder where the main setup.exe resides in at runtime.
Posted: Fri Aug 11, 2006 7:44 pm
by MarkRichards
Argh, I can't believe I overlooked that one. Thanks Michael!
Posted: Thu Sep 14, 2006 3:12 am
by Ton_B
I've got the same problem. however, I'm not using the exe as my setup, but created an msi file using the group policy wizard.
In that case all of the next variables will point to the temp dir of the current user...
$EXEDIR$
$MSIFILE$
$SFXPATH$
But I really want to use the network share !
Posted: Thu Sep 14, 2006 11:21 am
by MichaelNesmith
Just pass that value to the outer MSI as part of the CMDLINE public MSI property, which will then be passed to the inner MSI and your setup can read that using the CMDLINE variable.
Posted: Fri Sep 15, 2006 2:15 am
by Ton_B
So, I can place the variable $SFXPATH$ into the the 'command line parameter' in the group policy wizard dialog ?
The path of the file can be differtent per customer!
Posted: Fri Sep 15, 2006 3:35 am
by MichaelNesmith
No, that is not what I meant. You should use the CMDLINE public MSI property to pass path information to the actual setup.
Posted: Fri Sep 15, 2006 4:28 am
by Ton_B
I've lost track ....
I really don't know what you mean.....
What do you mean with "CMDLINE public MSI property"
and where can I find it?
As you probabbly know, I'm building a MSI setup converting the Executable to an MSI file using the Group Policy wizard.
Posted: Fri Sep 15, 2006 12:41 pm
by MichaelNesmith
Please read the help file entries for the Group Policy Wizard tool. This is explained in detail there. Also, the Group Policy Wizard tool itself contains some hints on its own user interface, please read them carefully.