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
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Text File Creation problem in custom code action
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
‎Oct 03, 2011
07:23 AM
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.
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.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 04, 2011
12:33 PM
Could you please explain what you're trying to achieve? Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 07, 2011
01:15 AM
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.
Actually i want to log the string input and return value of java function,
If there is any other way to log, please help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 07, 2011
03:17 AM
The installation log is created only when the installation has finished.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2012
12:55 PM
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();
}
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();
}