cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nlamka
Level 3

InstallScript - How to set the FEATURE_FIELD_CDROM_FOLDER

I have an InstallScript project and for CD Builds I include a set of uncompressed files and give the user the option to install them locally or not.

My issue (which my just be that I don't understand instead of an issue) is that when I specify the cd folder in the designer ( \extras for example) and do a build an extras folder is build under disk1 ( disk1\extras ) and the files are copied to that folder. On the distribution CD I need to place the files in an extras directory off of the CD root. My plan was at run time to find where the files are actually located on the distribution media and then use the FeatureSetData ... FEATURE_FIELD_CDROM_FOLDER option to set the propler location for the feature/component files.

The code uses FindAllFiles and returns the proper path to the file I'm looking for, I then used ParsePath and LongPathToQuote to get the directory and call FeatureSetData. For some reason, this fails with a rc -137 "An invalid option has been specified for a feature function". I don't really understand this error. More importantly perhaps, I guess I don't really know if this is an issue that I need to worry about or not. If (before the FeatureSetData call) I use FeatureGetData and look at the CDROM_FOLDER value it is set to what I used in the designer so perhaps the question should be, given how the build creates the file structure, how do you debug the setup where the files may be in different physical locations on my build system vs the physical CD?

Thanks
Neil
Labels (1)
0 Kudos
(8) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The DISK1 folder location is essentially the root of your CD. So, the 'extras' folder would be located off of the root of the CD when you burn the contents of the DISK1 folder to a CD.

It appears that there is a documentation error with the FeatureSetData function. The FEATURE_FIELD_CDROM_FOLDER value is read-only (i.e., it uses the value set in the project); attempting to set this value will result in a -137 error. This would make sense since you normally can't rename the folder that is on a CD-ROM. I have filed this documentation issue under work order IOC-000072473 to have this corrected in a future release.
0 Kudos
nlamka
Level 3

So, assumption is that all your setup files appear in the root of the CD instead of in a directory off of the root. Seems like an "interesting" restriction.

Thanks for the reply
Neil
0 Kudos
esiemiat
Level 9

I have, in the past, specified a path in the feature's CD Folder that was more than one level deep. Then, by specifying that those features were to be left uncompressed in the release wizard, the build would create the proper folder strucuture on the CD.

Is this what you are trying to accomplish?
0 Kudos
nlamka
Level 3

Yes, this is what I'm trying to do, however, on the CD the structure is

\ (CD Root) with some files
\Setup (product setup)
\Extras (the stuff I want uncompressed)

this does not seem to be possible as, specifying the folder location in the setup designer as

\Extras

actually creates a Disk1 image under Media with Extras as a folder under Disk1

\Disk1 (with all the setup files
\Disk1\Extras (with my extras)

So instead of being at the same level as Disk1 it is a subfolder.

So, what I was trying to do then was to fix it at run time by setting the folder location to represent the proper structure which seemed to be possible but is not as the property is actually read only.

Neil
0 Kudos
esiemiat
Level 9

I see, you want the files in a folder that exists at the same level as the folder that contains the install. I use a batch file at build time that configures the CD the way I want. However, I see your issue in that the files at that level cannot be included as part of a feature in the install.
0 Kudos
nlamka
Level 3

Yes, that is exactly the issue. If the cd folder property could be set then I could fix this at run time since I know the build type and can locate the files that I need. Since it is read only I'm kind of stuck I think.
0 Kudos
DLee65
Level 13

I am not entirely sure I fully understand what you want to accomplish. As I read this you have files that you want to appear at the root of the CD media instead of a subfolder. These files also need to be included as part of a feature.

Is there a reason you cannot add the files to the feature directly at design time and set the feature CD-ROM value to a path like .\.. to move the file to the root of the CD media? I seem to recall using this format a few years ago, but it has been a while since I have worked with an InstallScript install and I could not find a ready example in my recent archives. Also I am not sure if I needed to use just a single dot or the format I showed above.
0 Kudos
nlamka
Level 3

Well, I didn't actually think to try that format. I used .\..\Extras and got exactly what I was looking for. Thanks.

Neil
0 Kudos