PDA

View Full Version : Create empty folders in Basic MSI



gusti6
01-22-2015, 12:55 PM
Hello,

I am trying to create an empty folder on the C:\ drive, or wherever the main drive is, so on the Destination computer's folders feature, I tried using [WindowsVolume] and [PrimaryVolumePath] and created some folders there.

But nothing happens during installation, I can't find any of these folders being created.

Note: The program installs where I want it to, etc, except for these empty folders.

Thanks!

tjohnson1
01-22-2015, 03:45 PM
Try creating a component with nothing in it and set the destination to the location and folder name that you want created

gusti6
01-22-2015, 04:12 PM
Nope, it didn't work.

rrinblue22
01-23-2015, 08:28 AM
Create a Component with nothing in it and set the destination with the Empty folder you want to create ... say [INSTALLDIR]Dummy
make sure this component is associated to a Feature that's being installed.

clawdtm
01-23-2015, 08:43 AM
Did you try basing your parent folder on the ROOTDRIVE property?
It's not visible in the project, but you can create an InstallScript CA to extract its value and set it to a Directory property.

*LE* also, did you check for permissions problems? (that's a bit of a long shot, because I presume you're running it as admin)

gusti6
01-26-2015, 10:35 AM
Yep, I'm running it as an admin.

I tried Creating a New Feature in Setup Design, and then adding a component with nothing in it. The Feature has the Destination [WindowsVolume]SOMENEWFOLDER
and also tried [PrimaryVolumePath]AFOLDER...

but still nothing happens. :/

I'm running the Professional Version btw.

gusti6
01-26-2015, 12:52 PM
Managed to get it to work, the feature wasn't installing. But now I have another problem...

Since I am using Basic MSI, and I have to install Feature A always. But Feature B ONLY if selected on the Custom Type Option

I have to go to Dialogs -> Setup Type -> Behavior -> Next -> Changed AddLocal to ALL. (Originally was Feature A that was the problem ). This kind of works.

If I try using the same but to Feature A only, and adding more items of AddLocal for EmptyFolderFeature it does not install. Any ideas?

Thanks!

ravnstorm
12-03-2015, 10:22 PM
I have a problem with this as well. Why won't installshield install empty directories???
My project is an installscript project. Certain components of our software expect certain empty folders to exist, in order for it to function correctly. So I have to somehow install/create them, and nothing is working. I have tried to:

1. Disable logging, and then use CreateDir functions, then Enable logging. This is only working in my service pack installers, not in the big installers, which span 5 DVDs. I can't figure out why, for the life of me.
2. Do as you said, and create empty components which install to the desired locations. This appeared to work as the installer was running (the directories were there). As soon as the installer finished, they were gone. The installer deleted them.