This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: InstallScript - How to set the FEATURE_FIELD_CDROM_FOLDER
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 14, 2008
02:51 PM
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
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
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
12:40 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
01:18 PM
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
Thanks for the reply
Neil
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
01:36 PM
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?
Is this what you are trying to accomplish?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
02:12 PM
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
\ (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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
03:08 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2008
03:32 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2008
04:04 AM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 17, 2008
09:41 AM
Well, I didn't actually think to try that format. I used .\..\Extras and got exactly what I was looking for. Thanks.
Neil
Neil