View Full Version : How to read a file from current media at runtime?

04-11-2003, 07:27 PM
:rolleyes: I need to read a file from wherever the installer is starting (current media) and read some values of some parameters in that file. For reading the values I got the custom code but all my attempts to read the file using $P(x.y) faild. Any idea? Thnx

04-16-2003, 03:45 PM
I believe $J(user.dir) should help.

I call 3rd Party installs from the local media this way


04-18-2003, 01:49 PM
Could you provide a bit more information about the use case here (I'm not certain how the "$P" call is being used in reference to this issue)?

Also, you may want to add the resource to the installation as an external resource using the "putExternalResource()" method at build-time. You would then be able to retrieve the URL to the resource at run-time (using "getExternalResource()"). If the resource does not need to be visible outside of the installation archive, you could use "putApplicationResource()" or "putNormalResource()" for the same scenario. the details on those methods are in the API help files for the "ArchiveBuilderSupport" class.

04-28-2003, 04:13 PM
Hi william,

Thnx. Here is what I need to do. We have documents of product we are releasing, which can be modified in the last min. b4 release announcement and get cut to the CD as oppose to the actual product. That is why those files are not in the archive and need to be retrieved from the installation media (CD, or on the shared directory) independent from platform.
I could not find any built in function in ISMP that suits my purpose.


04-28-2003, 07:04 PM
Look into the "putExternalResource()" methods. They add files to the build that are external to the installation archive. Those same resources can be retrieved at run-time with a call to "getExternalResource()".