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

CA errors

Hi all:

So I am trying to run this CA, that is basically me kicking off an executable I find during system search (I know that at lease one copy MUST be there because my installation prerequisite ensures that). Anyway, the CA always throws an error. Here's what's in the log:

Action 15:11:44: ExpandGlassfish.
MSI (s) (C0:40) [15:11:44:541]: Executing op: CustomActionSchedule(Action=ExpandGlassfish,ActionType=3106,Source=C:\Program Files\Java\jdk1.5.0_09\bin\java.exe\,Target="C:\Program Files\Java\jdk1.5.0_09\bin\java.exe" -Xmx256m -jar "C:\glassfish-installer-v2ur2-b04-windows.jar",)
MSI (s) (C0:40) [15:11:44:541]: Note: 1: 1721 2: ExpandGlassfish 3: C:\Program Files\Java\jdk1.5.0_09\bin\java.exe\ 4: "C:\Program Files\Java\jdk1.5.0_09\bin\java.exe" -Xmx256m -jar "C:\glassfish-installer-v2ur2-b04-windows.jar"
Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: ExpandGlassfish, location: C:\Program Files\Java\jdk1.5.0_09\bin\java.exe\, command: "C:\Program Files\Java\jdk1.5.0_09\bin\java.exe" -Xmx256m -jar "C:\glassfish-installer-v2ur2-b04-windows.jar"
MSI (s) (C0:40) [15:12:21:293]: Product: NWGlassfish -- Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: ExpandGlassfish, location: C:\Program Files\Java\jdk1.5.0_09\bin\java.exe\, command: "C:\Program Files\Java\jdk1.5.0_09\bin\java.exe" -Xmx256m -jar "C:\glassfish-installer-v2ur2-b04-windows.jar"

Action ended 15:12:21: InstallFinalize. Return value 3.


Now, the part that I really like is that if - when the error pops up and the installer is stopped - I go and take that exact command and enter it on a command line... it works just fine.

What am I doing wrong?

Many thanks in advance...
Labels (1)
0 Kudos
(12) Replies
RobertDickau
Flexera Alumni

A couple of entries mention this as a source path---

Source=C:\Program Files\Java\jdk1.5.0_09\bin\java.exe\

---where the backslash at the end looks odd; perhaps that has a bearing on the problem? Perhaps tweak or post the system search settings?
0 Kudos
jedimaster_mark
Level 7

Ah, that. Yes, well, this backslash is being appended to this path by the installer. This is what is happening. The path is being derived from a system search in which I am setting a path to a file through a file search. So I am searching starting in C:\Program Files\Java for java.exe. If you look at the entire verbose log, this value is initially:
PROPERTY CHANGE: Adding JAVAPATH property. Its value is 'C:\Program Files\Java\jdk1.5.0_09\bin\java.exe'.

The slash is being added later, for what reason I don't know. However, because I wasn't sure whether I needed to reference the EXE explicitly in the CA (all the examples do), I am passing the JAVAPATH property into a VBScript CA that's stripping the string "java.exe\" off of the end, and then passing it back into JAVAPATH.

When I call the CA, my filename and command line value is:
"[JAVAPATH]java.exe" -Xmx256m -jar "[INSTALLDIR]glassfish-installer-v2ur2-b04-windows.jar"

Does that help?
0 Kudos
RobertDickau
Flexera Alumni

Well, a quick coffee-break test seems to work at this end:

Create system search that looks for java.exe in [ProgramFilesFolder]Java, stores path in JAVA_EXE.

In Custom Actions view, create New EXE > Path in property value action:
  • Executable Property: JAVA_EXE
  • Command Line: -jar "[INSTALLDIR]TrainApp.jar"
  • In-Script Execution: Deferred Execution in System Context
  • Install Exec Sequence: After InstallFiles
  • Inst. Exec. Condition: Not Installed

Build, run, TrainApp.jar seems to launch in one piece.
0 Kudos
jedimaster_mark
Level 7

Thanks for the input. As I will be out of town over the weekend, I won't be able to test this until Sunday night or Monday.

However, in the meantime, if you don't mind answering a question... I noticed you set it to Deferred in System Context... I was just using Deferred. That could by my problem. What's the difference?
0 Kudos
jedimaster_mark
Level 7

RobertDickau wrote:
Well, a quick coffee-break test seems to work at this end:

Create system search that looks for java.exe in [ProgramFilesFolder]Java, stores path in JAVA_EXE.

In Custom Actions view, create New EXE > Path in property value action:
  • Executable Property: JAVA_EXE
  • Command Line: -jar "[INSTALLDIR]TrainApp.jar"
  • In-Script Execution: Deferred Execution in System Context
  • Install Exec Sequence: After InstallFiles
  • Inst. Exec. Condition: Not Installed

Build, run, TrainApp.jar seems to launch in one piece.


Okay, this did seem to work. So, I am assuming the issue was the system context change. However, I now have another issues related to this. This CA is (obviously) expanding a jar file. After this runs, I want to run another CA that operates within a subdirectory that will exist after this CA runs. However, the installer chokes on this. It appears to be trying to verify the directory's existence before it gets anywhere near this CA. In other words, without the second CA, this works fine. When I add the second one, it errors before it ever even runs this one.

Is there a way to accomplish what I'm trying to do?

Thanks...
0 Kudos
RobertDickau
Flexera Alumni

"System context" just means to run in the elevated Local System account, if possible; the opposite is "with impersonation", which runs with the privileges of the user running the installation, which can cause problems on Vista.

What does the other CA look like? Where is it scheduled, etc.?
0 Kudos
jedimaster_mark
Level 7

The other CA is scheduled to run right after this one. It's set to deferred, system context. It's working directory is a directory created by the previous CA's action, and it is running a script that is generated in that step as well.

Does that help?
0 Kudos
RobertDickau
Flexera Alumni

What are the other action's settings? I gather it's a launch-an-EXE action, but perhaps you could post particulars?
0 Kudos
jedimaster_mark
Level 7

Working Dir: INSTALLDIR\glassfish
Command Line: lib\ant\bin\ant -f setup.xml
Return Processing: Synchronous
In-script Execution: Deferred in system context
Install Exec Sequence: After ExpandGlassfish (this is the previous CA)
Install Exec Condition: Not Installed

I realize that I could wrap this into a vbscript and just handle it that way... but that's somewhat hackish... and while I realize that this entire installer is hackish on account of my company has no idea what an installer should do, what the software should do, and what shouldn't be our problem because it's not our software in the first place... I still would prefer to make this the least hackish possible.
0 Kudos
RobertDickau
Flexera Alumni

The first thing that jumps out is that the working directory might want to be:

[INSTALLDIR]glassfish

instead of

INSTALLDIR\glassfish

It probably can't hurt to refer to ant.exe (instead of just ant) to make it explicit what you're executing.
0 Kudos
jedimaster_mark
Level 7

Well, if I use that as my working directory, I get an error stating that the directory does not exist in the Directory table. Which... of course it doesn't as the directory doesn't exist until the previous CA runs.
0 Kudos
RobertDickau
Flexera Alumni

Aha, yes, if that field is expecting an identifier, perhaps earlier place a set-a-directory property that sets GLASSFISH_ROOT to [INSTALLDIR]glassfish, and then use GLASSFISH_ROOT as the working directory?
0 Kudos