cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

hi can i use custom action template for this

hi,
i want to know if i can use customaction class and in the install() method call
public void install(Installerproxy ip){

String some=ip.substitute("$USER_INSTALL_DIR$");
String another=some.subString(0,2);
ip.setVariable("XXX_HOME",another);
}
Am i right in this or is there anydiscrepancy
My aim is to get the value of User install folder ,Get the first two characters say
C: or 😧 or E: and set an environment variable XXX_HOME to C: or 😧 or E:

so that i can use it in my batch file for moving from Temp directory of Windows
Batch script code to be used:
%XXX_HOME%
call cd %SQL_HOME%
call mysql -ulocalhost -uroot -proot -P3306 < %SQL_HOME%\xxxx.sql

Any suggestions and the custom code for the above requirement are eagerly awaited.If i can do as described above
Labels (1)
0 Kudos
(1) Reply
purcellk24
Level 7

Sure, have you tried it yet? Make sure you call your custom action before you want to use the XXX_HOME variable.

I use cd /d , although I don't know for sure what version of windows the /d switch became available.
0 Kudos