Methods/Techniques to install empty folders

Got a problem you cannot solve? Try here.
Post Reply
ScottMuc
Posts: 4
Joined: Mon Jan 25, 2010 3:49 pm

Methods/Techniques to install empty folders

Post by ScottMuc »

In our installer we wish to install upwards of 50 empty folders. The app breaks if these folders don't exist, and if they have dummy files. Unfortunately we are dependent on code which has these constraints.

I don't want to create 50 Create Folder statements because that means updating the installer just because someone created a new folder that needs to be part of the build.

Currently, We run a script that populates all these empty folders with 'dummy.tmp'. Once these folders have been extracted I would like to remove all of these files. At what point during the install can this be done and how?

I've tried using DELETE FILES RECURSIVE %TARGETDIR%\\SomePath\\*.tmp but the files still exist after installation.

Thank you for your assistance.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Ensure Delete Files Recursive is called after the call to Apply Install.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
ScottMuc
Posts: 4
Joined: Mon Jan 25, 2010 3:49 pm

Post by ScottMuc »

Thank you! I'll give that a shot. I sort of got thrown into the InstallAware side of our project so there's a lot of learning as I go right now.
ScottMuc
Posts: 4
Joined: Mon Jan 25, 2010 3:49 pm

Post by ScottMuc »

Hi Michael,

I'm afraid DELETE FILES RECURSIVE doesn't behave the way that I would like. It's definitely running now.

Unfortunately the installer removes the folder along with the dummy file!

My exact command is:
Recursively Delete Files $TARGETDIR$\\dummy

If I have a tree like:

Code: Select all

\\A
  \\B
     dummy
  \\C
     dummy
  \\D
     usefulfile.xml
It will delete folders B and C (which I want to keep)
ScottMuc
Posts: 4
Joined: Mon Jan 25, 2010 3:49 pm

Post by ScottMuc »

I got around this issue by using Run Program and execute cmd.exe /C del /S .\\dummy in $TARGETDIR$
Post Reply