Using AppSearch/LaunchCondition to Check for FireFox.exe
Hi,
I've downloaded the Adobe Flash MSI installs for both IE (ActiveX) & other browsers such as FireFox (Plugin). I've assigned the IE install via Group Policy Software Installs easy enough. I'd like to do the same to the Plugin version, but only want it to install IF FireFox exists (we only use IE or FireFox). SO I'd like to create a condition in the MSI that checks for "C:\Program Files\Mozilla Firefox\firefox.exe".
I'm new to editing MSI files, I've made a few basic ones in the past using wizard based application, but modifying an existing MSI is all new!
I've read a number of other posts on the forum, andhttp://support.microsoft.com/kb/827021 which suggest this could be done using AppSearch/LaunchCondition/System Search. However, I'm using ORCA to open/view/modify the MSI file, and I can not see how to add the System Search table (LaunchCondition already exists and I've managed to add the AppSearch table), is System Search a table? Or am I misinterpreting the post? Also in the AppSearch, it asks for a Signature, how do I find out the signature?
Any help or advice would be most appreciated!
Ben
I've downloaded the Adobe Flash MSI installs for both IE (ActiveX) & other browsers such as FireFox (Plugin). I've assigned the IE install via Group Policy Software Installs easy enough. I'd like to do the same to the Plugin version, but only want it to install IF FireFox exists (we only use IE or FireFox). SO I'd like to create a condition in the MSI that checks for "C:\Program Files\Mozilla Firefox\firefox.exe".
I'm new to editing MSI files, I've made a few basic ones in the past using wizard based application, but modifying an existing MSI is all new!
I've read a number of other posts on the forum, and
Any help or advice would be most appreciated!
Ben
0 Comments
[ + ] Show comments
Answers (12)
Please log in to answer
Posted by:
Inabus
16 years ago
LaunchCondition table:
Condition
FIREFOX <> NULL
Description
Error, Firefox.exe not found
AppSearch table:
Property
FIREFOX
Signature_
NewSignature1
DrLocator table:
Signature_
NewSignature1
Path
[ProgramFilesFolder]
Depth
10
Signature table
Signature
NewSignature1
FileName
firefox.exe
The above will do a system search through program files for firefox.exe and if found will run the app, if not found the app will fail with the error "Error, Firefox.exe not found"
Paul
Condition
FIREFOX <> NULL
Description
Error, Firefox.exe not found
AppSearch table:
Property
FIREFOX
Signature_
NewSignature1
DrLocator table:
Signature_
NewSignature1
Path
[ProgramFilesFolder]
Depth
10
Signature table
Signature
NewSignature1
FileName
firefox.exe
The above will do a system search through program files for firefox.exe and if found will run the app, if not found the app will fail with the error "Error, Firefox.exe not found"
Paul
Posted by:
blacklisted_packager
16 years ago
Posted by:
FrankSpierings
16 years ago
You can probably use this post: http://itninja.com/question/how-do-you-roll-out-new-machines?9136
And you can use the Windows Installer SDK documentation for more information. For the table reference: http://msdn2.microsoft.com/en-us/library/aa368259.aspx
Hope this helps
And you can use the Windows Installer SDK documentation for more information. For the table reference: http://msdn2.microsoft.com/en-us/library/aa368259.aspx
Hope this helps
Posted by:
bjblackmore
16 years ago
Hi Inabus,
Thanks for the reply, great details!
I used a GUI MSI creation tool just before you post, and got virtually the same output, apart from the Signature. The GUI tool provided:
AppSearch table:
Property
FIREFOX
Signature_
FileSearchSign
Signature table:
Signature
FileSearchSign
FileName
firefox.exe
Does this matter? Or is it a case that as they reference each other, so as long as they are the same it doesn't matter?
Hi blacklisted_packager,
Looking at the tables InstallExecute and InstallUISequence, the LaunchCondition action has the sequence 410 in both, and the AppSearch action seems to have been assigned sequence 400, in both, automatically. Does this sound OK to you?
Many thanks to both of you for your help!
Ben
Thanks for the reply, great details!
I used a GUI MSI creation tool just before you post, and got virtually the same output, apart from the Signature. The GUI tool provided:
AppSearch table:
Property
FIREFOX
Signature_
FileSearchSign
Signature table:
Signature
FileSearchSign
FileName
firefox.exe
Does this matter? Or is it a case that as they reference each other, so as long as they are the same it doesn't matter?
Hi blacklisted_packager,
Looking at the tables InstallExecute and InstallUISequence, the LaunchCondition action has the sequence 410 in both, and the AppSearch action seems to have been assigned sequence 400, in both, automatically. Does this sound OK to you?
Many thanks to both of you for your help!
Ben
Posted by:
TOBES_UK
16 years ago
ORIGINAL: bjblackmore
AppSearch table:
Property
FIREFOX
Signature_
FileSearchSign
Signature table:
Signature
FileSearchSign
FileName
firefox.exe
Does this matter? Or is it a case that as they reference each other, so as long as they are the same it doesn't matter?
As long as they match, and they do they will work.
Posted by:
Inabus
16 years ago
Posted by:
bjblackmore
16 years ago
Posted by:
bjblackmore
16 years ago
AH, OK sorted, my fault, firstly I'd set FIREFOX=TRUE rather than FIREFOX <> NULL and secondly I was applying the transform wrong using
msiexec /i adobeflash.msi /t transform.mst
rather than
msiexec /i adobeflash.msi TRANSFORMS=transform.mst
I thought /t and TRANSFROMS= did the same thing!?
Seems to be working now! Ultimate test will be when I apply it to a group policy, and see if it installs/fails on any users!
Many thanks for all your help
Ben
msiexec /i adobeflash.msi /t transform.mst
rather than
msiexec /i adobeflash.msi TRANSFORMS=transform.mst
I thought /t and TRANSFROMS= did the same thing!?
Seems to be working now! Ultimate test will be when I apply it to a group policy, and see if it installs/fails on any users!
Many thanks for all your help
Ben
Posted by:
anonymous_9363
16 years ago
Posted by:
nheim
16 years ago
Hi Ben,
your approach isn't bullet proof, because, if somebody changes the install directory, nothing is being detected.
You should search for the following registry location:
"HKLM\SOFTWARE\Mozilla\Mozilla Firefox\CurrentVersion"
And please read this:
http://developer.mozilla.org/en/docs/Plugins:_The_first_install_problem
The Flash exe plugin installer is already using this aproach, if it detects Firefox.
If you want to use it with the MSI package, install Flash with the exe installer, capture the registry settings and import them to the MSI package.
Hope, this gives you some ideas.
Regards, Nick
your approach isn't bullet proof, because, if somebody changes the install directory, nothing is being detected.
You should search for the following registry location:
"HKLM\SOFTWARE\Mozilla\Mozilla Firefox\CurrentVersion"
And please read this:
http://developer.mozilla.org/en/docs/Plugins:_The_first_install_problem
The Flash exe plugin installer is already using this aproach, if it detects Firefox.
If you want to use it with the MSI package, install Flash with the exe installer, capture the registry settings and import them to the MSI package.
Hope, this gives you some ideas.
Regards, Nick
Posted by:
bjblackmore
16 years ago
Hi Nick,
Thanks for the details. I'll have a look into modifying the MSI again to search for the registry value.
One little problem I've noticed with this, is that as I'm deploying this MSI via Group Policy Software Installation, if the user doesn't have FireFox installed, the MSI still tries to install every time the user boots up their machine, which then fails. Is there something I need to set to stop the package being advertised to the machine continously once the install has failed?
Many thanks
Ben
Thanks for the details. I'll have a look into modifying the MSI again to search for the registry value.
One little problem I've noticed with this, is that as I'm deploying this MSI via Group Policy Software Installation, if the user doesn't have FireFox installed, the MSI still tries to install every time the user boots up their machine, which then fails. Is there something I need to set to stop the package being advertised to the machine continously once the install has failed?
Many thanks
Ben
Posted by:
anonymous_9363
16 years ago
Well, that's how GP is designed to work. However, if you want to stop install attempts after a failed attempt, off the top of my head I'd suggest adding a custom registry entry via a CA to the end of your install. Use a CA because by default it won't get rolled back in the event of failure. If the entry is detected, it means the install was attempted but it failed. If it's NOT detected, it means it no install attempt has been made. Add another CA to remove the entry after InstallFinalize. You may want to add conditions to one or both CAs.
There may be a simpler solution: if one comes to me, I'll re-post.
There may be a simpler solution: if one comes to me, I'll re-post.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.