cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
palanisamy
Level 7

Text File Creation problem in custom code action

Hi,

I used the following code to create text file during the preinstall state,


String fileSep = File.separator;
svFile = proxy.substitute("$INSTALL_LOG_DESTINATION$") + fileSep + proxy.substitute("$PRODUCT_NAME$")+ "_inst.log";
objFile = new File("svFile");
if(!objFile.exists())
{
objFile.createNewFile();
}


I run this script using Java it's working fine , but same code is not working during the preinstall scenario.

Please help.
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

Could you please explain what you're trying to achieve? Thanks!
0 Kudos
palanisamy
Level 7

thanks for reply pv7721

Actually i want to log the string input and return value of java function,

If there is any other way to log, please help.
0 Kudos
pv7721
Level 20

The installation log is created only when the installation has finished.
0 Kudos
nosrednayduj
Level 7

I wrote a little custom code to log from my java methods, the output goes directly into the installer log.

public static void doLog(InstallerProxy ip, String header, String text) {
CustomError error = (CustomError)ip.getService(CustomError.class);
error.setLogDescription(header);
error.appendMessage(text);
error.log();
}
0 Kudos