Hi,
The Phobos approach is very good but if you want to use the RUTAFF property in the search you already made my suggestion is to do like this:
In the .vbs script you need only the CurrentVersion so the Phobos script is reducing to something like this: (RUTAFF property keeps the result)
Code: Select all
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Mozilla\Mozilla Firefox"
strValueName = "CurrentVersion"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Session.Property("RUTAFF") = strValue
After you copy this code to a .vbs file switch to "Custom Actions" page in Advanced Installer and add a "New Attached Custom Action" under "InstallUISequence->Begin". Use following options for the custom action:
1. Function Name: empty
2. Execution Condition: (Not Installed)
To test the result of the search create a "Script in line" custom action under "InstallUISequence->AppSearch" and use this in the "Script Text" field:
Code: Select all
MsgBox Session.Property("RESULT_PROPERTY")
The RESULT_PROPERTY is the property of the search from your first post:
Root: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Mozilla\Mozilla Firefox\[RUTAFF]\Main
Name: Install Directory
Please let me know if you encounter any problems.
Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
FOLLOW US
Get the latest news in Application Packaging