jamespauly
06-01-2004, 02:09 PM
I building a custom event and I am trying to get the Install Dir inside of the Custom Event but all attempts have failed. Notice the $D(install) below. I have also tried resolveString($D(install)) and still no luck.
package com.installshield.sonicftp.event;
import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.product.ProductBean;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;
public class InstallScript
{
public void onExecutingrunSonica7bc885a92a478943a29fd4393c38a5f(com.installshield.event.wizard.WizardActionContext arg0)
{
Runtime run = Runtime.getRuntime();
String installDir = $D(install);
try {
System.out.println(installDir);
java.lang.Thread.sleep(6000);
Process pro = run.exec("java -Dsonicsw.install.target=" + installDir + " -Dsonicsw.install.setup.ini=" + installDir + "\\setup.ini -jar " + installDir + "\\setup.jar -silent");
System.out.println(pro.toString());
}
catch(java.lang.Exception e){}
}
}
package com.installshield.sonicftp.event;
import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.product.ProductBean;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;
public class InstallScript
{
public void onExecutingrunSonica7bc885a92a478943a29fd4393c38a5f(com.installshield.event.wizard.WizardActionContext arg0)
{
Runtime run = Runtime.getRuntime();
String installDir = $D(install);
try {
System.out.println(installDir);
java.lang.Thread.sleep(6000);
Process pro = run.exec("java -Dsonicsw.install.target=" + installDir + " -Dsonicsw.install.setup.ini=" + installDir + "\\setup.ini -jar " + installDir + "\\setup.jar -silent");
System.out.println(pro.toString());
}
catch(java.lang.Exception e){}
}
}