pfletch101
Posts: 24
Joined: Sat Aug 18, 2012 9:19 pm

Need Installation CD Drive name.

I am writing an installer for a fairly simple program which indexes and presents a large number of data files. It will be distributed on a data DVD. I would like the installed program to default to looking for its data files on the installation DVD (copying them over to a user-specified location on the target system will be an option, but, because this data is archival and will be very rarely needed, most users are unlikely to want to do this). I am probably looking in the wrong places, but I can't see a global variable which is available at install time and contains the path from which the program is being installed, which I could modify and save in the Registry as the default data path. Please advise.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Need Installation CD Drive name.

Hi,

In order to get the location of the installation package you can use one of the following properties:
  • SOURCEDIR - if the package is an MSI
    SETUPEXEDIR - if the package is an EXE
If you want the resources to be used directly from the DVD and not be extracted on the user's machine, you can go in the "Builds" (Media) page of your project and choose one of the "resources next to it" options from the "Package Type" section.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pfletch101
Posts: 24
Joined: Sat Aug 18, 2012 9:19 pm

Re: Need Installation CD Drive name.

My package is an EXE, but the Properties browser on the Registry page is only showing me [SOURCEDIR] as an available option. I presume that this is what I should use.

{Later} After trying the experiment, I find that [SOURCEDIR] returns not the directory from which the original installation package (a single EXE) was run (D:\ in this case), but a directory way down in the AppData tree from which (I assume) the unpacked MSI is run. This does not help!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Need Installation CD Drive name.

Hi,

Indeed the Properties selection dialog does not display all the properties, but you can write them manually and use them. So, you can use the [SETUPEXEDIR] property where you need it and it will work.

The [SOURCEDIR] property displayed the folder of the MSI package and in this case the MSI is extracted to a temporary location.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pfletch101
Posts: 24
Joined: Sat Aug 18, 2012 9:19 pm

Re: Need Installation CD Drive name.

Thanks! That does, indeed, work. It is, however, really confusing to have some (actually a lot of, if not most) AI-defined Properties available from the dropdown list while others, apparently of similar 'level' and/or importance, are not. If there were no drop-down list one would simply type in the desired property name, but the natural assumption in the presence of such a list is that it is comprehensive and that an AI-defined Property not on it is not available.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Need Installation CD Drive name.

You're welcome. I'm glad it worked.

We will try to improve that list, however I'm afraid that not all the properties can be displayed in the list because some of them are available only in some specific scenarios, not all the time.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pfletch101
Posts: 24
Joined: Sat Aug 18, 2012 9:19 pm

Re: Need Installation CD Drive name.

One approach, which should not be too costly, might be to have an explicit 'Other' entry in the dropdown list, leading to a text box for manual entry of the Property name. This would at least serve as a warning that the list was not fully comprehensive.

Return to “Common Problems”