While working on a pure InstallScript installation, I tried all of the built-in path selection dialogs looking for one that would fit my requirements.
What I needed was a dialog that would allow the user to select a new folder, whether it was on the hard drive or on the CD/DVD-ROM drive. I was writing an installation for a mapping product where the user could read the map libraries from the DVD-ROM or from the hard drive. If they wanted to read from the hard drive, the libraries would be coped there during installation.
I looked at the following built-in functions:
It turns out that none of these would work. The reason is they call SelectDir(), and that function will not allow you to choose a CD/DVD-ROM drive as a destination. These functions were probably written with the idea that the user would only use them to select a destination path for the installation. If that’s the case, then it all makes sense. But that wouldn’t work for me.
I created a .NET Class Library and called it from the script. In the library, I used the .NET FolderBrowserDialog() function with the ShowNewFolderButton property set to TRUE, so the user could create a folder if he wished. It worked like a charm.
I am documenting this in case someone needs similar functionality in a pure InstallScript project. There is no need for you to look for a built-in InstallShield function, when there isn’t one.