guypb
Posts: 28
Joined: Thu Dec 18, 2008 5:16 pm

Create Folder on Target Drive

OK, I've seen the answer suggested elsewhere but am not sure exactly what I need to do to achieve it.

I am installing the application folder on any drive (defaults to windows volume (C:) but could be changed to D:).

I also need to create another "temp" folder on the root of the SAME drive - e.g. "D:/Temp"
How do I define the installation drive on the Files & Folders page?
I have seen Custom Actions mentioned but am not sure how to do this.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Create Folder on Target Drive

Hi,

For this you need to define a property based folder, not a regular one, in Files and Folders page. In the folder you can place the files you want to end up in the "temp" folder
from the new drive. Now, for building the final path you need to use a small predefined custom action, i.e. Property Set with Formatted. This custom action will set the property
attached to your property based folder, lets call it MY_FOLDER, to the value of the property that contains the drive letter selected and to which you append "temp".

The custom action needs to be set under "Begin" standard action, in InstallExecuteSequence. And use as an execution condition the following: NOT Installed.

Settings for the custom action fields:

- Property : MY_FOLDER

- Formatted Text: [APPDIR]temp\

Assuming that "APPDIR" is the property in which you store the drive letter selected.

If you have any questions let us know.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
guypb
Posts: 28
Joined: Thu Dec 18, 2008 5:16 pm

Re: Create Folder on Target Drive

Did everything you stated, and not working for me.
Keeps trying to install my "temp" folder on the network.

I feel I am missing a step - notably the step that obtains the drive letter.
I keep thinking this should be really simple.
guypb
Posts: 28
Joined: Thu Dec 18, 2008 5:16 pm

Re: Create Folder on Target Drive

OK, think I've sorted it using an inline VBS on the APPDIR to get the drive letter.

Return to “Common Problems”