Create Empty Folder - Advanced Installer Community
greggomatic
Posts: 2
Joined: Fri Jun 07, 2013 2:30 pm

Create Empty Folder

Hi,

I have created an empty folder in my install that I want to be installed each time and have everyone permissions on it. This folder is created underneath a folder that is synchronizing content from our build location (so files are being synced into this parent folder along with the need for this folder to be created).

When I build the solution, I notice the folder is deleted upon build. I have tried marking the folder as "never" be removed from the system and it still has the same impact.

Is there a way to setup the install to create this folder?

Thanks - Greg.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Create Empty Folder

Hello Greg,

Unfortunately, this is the default behavior. When you rebuild the application a “Refresh” operation(you can also test using the [Refresh] toolbar button) is made and your folder is automatically deleted because it isn't in the folder on which you synchronized with.

In order to achieve what you want, you can create a property based folder using a property that will store the path of your desired empty folder. First you can go in the “Install Parameters” page and create a property(e.g. MY_PROP).

Then you can go in the “Custom Actions” page and add a “Set installer property” custom action. The “Property” field you can edit to the property's name defined before( MY_PROP - in our example) and in the “Value” field you should set your synchronized folder identifier followed by your empty folder's name (e.g. [FolderName_Dir]\MyEmptyFolder).

Please notice that your “SetProperty” custom action should be added in the “Install Execution Stage” after the “Paths Resolution” stage. It should also be added (drag it while the Shift key is pressed) in the “Wizard Dialogs Stage” after the “Paths Resolution” stage.

Now you can go in the “Files and Folders” page and create a property based folder.

If you have any more questions please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”