Using the GET_PATH AdoScript command, you can retrieve the installation directory and construct the absolute path.
There is a problem with this implementation. When I use the GET_PATH command, the resulting path contains this string:
1"C:\Program Files (x86)\BOC\ADOxx15_EN_SA\"
which is part of a variable called
sExportPath, saved for further use.
Notice the spaces in the
Program Files folder name.
In the case where I have to run the .jar, this command works if I add the quotes before and after the path variable.
1SYSTEM ("cmd /c java -jar \"" + sJARpath + "\" " + sJARargs)
But in other cases, it doesn't seem to work, with or without the quotation, and I'm guessing that the problem might be because of the spaces. A couple of examples that
don't work:
1CC "AdoScript" FWRITE file: (sADOXMLExportFile) text: (sModifiedXml) binary:0
In this case the xml export file is never created,
ecode is 1.
1CC "Application" GET_PATH "ECAVI\\clingo.exe"
2 #--> returns: "C:\Program Files (x86)\BOC\ADOxx15_EN_SA\ECAVI\clingo.exe"
3SET sClingoPath: (path)
4SYSTEM ("cmd /c " + sClingoPath + ....)
In this case, the
clingo.exe cannot run.
I have tried different paths that don't contain spaces and they work perfectly.
Any thoughts?