Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Problem finding Tuxedo

Hi,

I have a problem finding tuxedo. Tuxedo is a middle ware. Our application works entirely on this middle ware, so before installing application we need tuxedo to be checked whether it is installed or not. Our application works for 7.1 or higher version of tuxedo. So here is the problem now if we install tuxedo 7.1 its home directory will be [ProgramFilesFolder] BEA Systems/Tuxedo and the registry key will be available at SOFTWARE\BEA Systems\TUXEDO\7.1\Major_Version and if we install Tuxedo 8.1 its home directory will be at C:\bea\Tuxedo8.1 and the registry key will be available at SOFTWARE\BEA Systems\TUXEDO\7.1\Major_Version. If i check the condition for Tuxedo 7.1 the installation goes on smoothly so if i check it for Tuxedo 8.1 its failing. How do i proceed now. Because some of our clients are on 7.1 Tuxedo and some others on Tuxedo 8.1 so how should i proceed now.

Thanks in Advance,
Harish.Y
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Enumerating registry subkeys

Hi,

Tuxedo 7.1 creates the following registry key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\BEA Systems\TUXEDO\7.1
while Tuxedo 8.1 creates the following key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\BEA Systems\TUXEDO\8.1
Therefore, we need a Custom Action that enumerates all the subkeys contained by a given registry key. An example VBScript that performs this task is given below:

Code: Select all

Function EnumRegSubkeys		
	const HKEY_LOCAL_MACHINE = &H80000002
	strComputer = "."
	Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
	strKeyPath = "SOFTWARE\BEA Systems\TUXEDO"
	
	ret = objReg.EnumKey(HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys)
	
	' MsgBox ret
	
	' Test if the EnumKey function was successfull or not
	If ret <> 0 Then
		' Set a property that will be tested in Advanced Installer
		Session.Property("TUXVER") = "ERROR"
		Exit Function
	End If
	
	Dim VerCompArray
	Dim MaxMajorVer, MajorVer
	
	' Assume that the installed version is recent enough
	Dim TuxVer : TuxVer = "OK"
	
	MaxMajorVer = 0
	
	' Enumerate the subkeys in the array
	For Each subkey In arrSubKeys
		' MsgBox subkey
		
		' tokenize the subkey into version components
		' (major.minor etc)
		VerCompArray = Split(subkey, ".", -1, 1) 
		MajorVer = CInt(VerCompArray(0))
		
		If MajorVer > MaxMajorVer Then
			MaxMajorVer = MajorVer
		End If
	Next
	
	If MaxMajorVer < 7 Then
		TuxVer = "NOT_ENOUGH"
	End If
	
	' MsgBox(Tuxver)
	
	Session.Property("TUXVER") = TuxVer
	
End Function


Note that this script uses the WMI "StdRegProv" class. WMI is preinstalled in Windows Server 2003, Windows XP, Windows Me, and Windows 2000. For Win95/98, WMI CORE 1.5 is available for download at Microsoft's website. For more information about this WMI class, please visit:
http://msdn.microsoft.com/library/defau ... egprov.asp


How to use this script:
1. Create a new text file ("TuxedoVer.vbs") containing the above code.

2. Switch to the Custom Actions page and make sure that the "AppSearch" Standard Action appears under both sequences ("InstallUISequence" and "InstallExecuteSequence"). Use the "Show Standard Action" toolbar button or context menu item for this purpose.

3. Right click one of the "AppSearch" items and select "New Attached Custom Action", then select the file you have created in step 1.
- In the Function Name field enter "EnumRegSubkeys".
- Set the following Scheduling Option: "Execute only once if present in both sequence tables".
- Set the Execution Condition to: (Not Installed).

4. Keep the SHIFT key pressed and drag this Custom Action to the other "AppSearch" tree item. Note that the script will be executed only once, although it appears in both sequence tables.

5. Switch to the "Launch Conditions" page a create a new condition:
Condition:

Code: Select all

 TUXVER = "OK" 
Description:

Code: Select all

Tuxedo is not installed or your Tuxedo version is too old.
6. Modify the script if necessary so that it checks the minor version too.


Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Thanks a lot Denis. That solved my problem.

Thanks,
Harish
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

I have migrated from 3.5 to 3.6 now i m unable to check for tuxedo its flashing an error as

There is a problem with windows Installer package.
A script required for this install to complete could not be run, Contact your personnel or package vendor.

Please help me in this case.

Thanks,
Harish.Y
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

This error is obtained when a custom action cannot be executed or it finishes with an error code. Did you change in any way the project, especially the way the custom action is set up?

If not, please send the AIP file to support at advancedinstaller dot com so we can examine it and identify the problem.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

I had sent the aip through mail please go thru it and let me know where am i going wrong.

Thanks in Advance,
Harish.Y

Return to “Common Problems”