kasi
Posts: 3
Joined: Sat Nov 03, 2018 9:46 am

Copying files to installation directory

Thu Nov 29, 2018 11:18 am

Hi,

I am using Advanced installer-11.5.1 and tries to include zip file in that installer and tries to copy those zip file into application installation directory(either C (or) D(or) E, i don't know where the client install the software).

for this we have done below steps:

1) Added one property in Install parameters with name="MY_DIR" and value="[APPDIR]" (here you are using direct path like "C:\Dir\..." it is copying fine without failure but when i am using dynamic path like "[APPDIR]" it's getting error like "Could no t access network location ...")
2) and also added PropertyBased folder in Files and Folders menu.

Can you please help me how to copy those files into certain location.

Regards,
-Kasi

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Copying files to installation directory

Thu Nov 29, 2018 4:03 pm

Hello Kasi,

The reason you are encountering that behavior is because, when you initialize a property in the "Install Parameters" page, the property and its value are added in the "Table Editor", "Property" table. The problem here is that the fields from the "Property" table does not accept formatted references (e.g. {APPDIR]).

Also, properties are global variables used by Windows Installer during an installation. Their values can be set by the operating environment or by authoring them into the installation database. Properties can be used inside Formatted Type fields with the format [PROPERTY] and they will be replaced at install time with the value associated with the property's name.

With that being said, you can not assign, as value to a property, another property by using the "Install Parameters" page.

E.g.:
Name: MY_DIR
Value: [APPDIR]

Now, the workaround to set your property (MY_DIR) to the value of the [APPDIR] property, you can proceed as it follows:

- You can go to "Dialogs" page, click on the "FolderDlg", click on the "Next" button and, under "Published Events" tab, click on "New..." to create an event as it follows:

- Event: Set installer property value
- Property: MY_DIR
- Argument: [APPDIR]
- Condition: you can leave unchanged (the default condition is "1" or "AI_INSTALL")

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”