View Full Version : How to read a external File during installation

05-05-2006, 02:04 PM
I want to read the contents of a xml file and set it to a $V(variable).

For this purpose, i have a java class .

This Java class is able to read the File using regular Java I/O. But if i integrate this class with Installer in OnInstalled event of a component , then it is not reading the File.
I am not able to find out what is the problem.

Is there any guidelines that i need to follow to make File I/O from installer.

or Is there any other alternative way to read a file?.


05-08-2006, 04:10 AM
Have you succeed integrating other classes in the "OnInstalled". Maybe you should make sure that part is working correctly (I haven't tried before).

As for reading external files, I do that inside a Dialog using FileInputStreams, and I cannot recall having any trouble with it.

As an alternative, I think there are no predefined "Product Actions" for this, but maybe you could download the "XML File Update" from http://www.installshield.com/downloads/beans.asp?prod=mpf and modify it, or create one from scratch. You can add that Product action to the component after the "Copy Files" action.