This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Check the Properties Table
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
10:29 AM
Can the Condition Property for a Component check and see if the registry present
I have an MSI Installscriprt project that contains a component that I only want installed if an entry in the Registry is not present. I would like to know if and how I can use the Condition Property for that Component to check and see if the registry entry is present, and only install if registry can't be found.
(30) Replies
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
11:41 AM
You would probably want to perform a system search for the registry key for which you're searching and then use a condition on your component appropriately for the property set by the system search.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
01:59 PM
I created the search and decided to search for File Path and exe and I gave it the name IS_TAIE_INSTALLED. For the condition builder, if I enter the IS_TAIE_INSDTALLED>0, the component should not get installed-right?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
03:37 PM
You should be able to use just the property name IS_SOMETHING_INSTALLED as the component condition; no need to compare it to zero or anything. Creating an MSI log file will tell you what the value is, which in turn tells you if the system search succeeded.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
07:54 PM
But what if I only want the component installed if the file I'm looking for is not found. Would I then need to have some type of argument and if so, what would you suggest using?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
09:03 PM
Now that I have created this property to check for the exe, it always detects the file as being present even when it is not, thenwhen it posts a dialog box indicating the exe is installed, when I click the OK button, the installation aborts. Why is the file always detected as being present when it isn't, can the dialog box with the file being present be supressed and why does the installation abort when you click ok to the dialog box?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 29, 2008
02:16 PM
I have found our what was causing the System Search\Condition to abort my installation. Apparently the System Search property I created ended up as a Launch Condition so I deleted it from the Direct Editor, however now if I enter the Property Name into the Condition for my Component, the component always installs
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 30, 2008
02:28 PM
My personal suggestion is to take a look at a log file and see what's actually being set by the MSI engine.
For more information on conditional statements, see this MSDN article:
http://msdn2.microsoft.com/en-us/library/aa368012(VS.85).aspx
Overall, you're going down the right track, but I think you're making some assumptions that are overcomplicating the issue. Simply, if the entry you choose stores its value in the property MYTESTPROPERTY then the condition is MYTESTPROPERTY if you want to conditionalize on its existence. For the case of non-existence, you would enter Not MYTESTPROPERTY.
Additionally, you may want to take another look at what you're searching. As indicated by the dialogs, do not include the registry root e.g. HKEY_LOCAL_MACHINE in the path you are searching for. So if you want to find HKEY_LOCAL_MACHINE\SOFTWARE\InstallShield\14.0\Professional, your entry should simply be SOFTWARE\InstallShield\14.0\Professional. There is a combo box to select the registry root.
For more information on conditional statements, see this MSDN article:
http://msdn2.microsoft.com/en-us/library/aa368012(VS.85).aspx
Overall, you're going down the right track, but I think you're making some assumptions that are overcomplicating the issue. Simply, if the entry you choose stores its value in the property MYTESTPROPERTY then the condition is MYTESTPROPERTY if you want to conditionalize on its existence. For the case of non-existence, you would enter Not MYTESTPROPERTY.
Additionally, you may want to take another look at what you're searching. As indicated by the dialogs, do not include the registry root e.g. HKEY_LOCAL_MACHINE in the path you are searching for. So if you want to find HKEY_LOCAL_MACHINE\SOFTWARE\InstallShield\14.0\Professional, your entry should simply be SOFTWARE\InstallShield\14.0\Professional. There is a combo box to select the registry root.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
08:57 AM
Dean H wrote:
I have found our what was causing the System Search\Condition to abort my installation. Apparently the System Search property I created ended up as a Launch Condition so I deleted it from the Direct Editor, however now if I enter the Property Name into the Condition for my Component, the component always installs
You might want to check the properties list to see if IS created the value there. If your condition goes like "IS_SOMETHING_INSTALLED" then if it's in the property table at all, it can allow this to get evaluated as true. If present - delete it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
10:34 AM
I tried to do the same thing and it just doesn't work. Instead i tried to build a condition on my components and that worked fine.
So instead of building a condition on my features, i'm using conditions on my components.
I used a system search that searched for the registry value 'test' with '1' as value data. The result was stored in the property INSTALLTEST.
In my component condition, i could use INSTALLTEST = '1' (value data had to be '1' ) or INSTALLTEST (registry value had to be found) to install that component.
This worked great but i wonder why it won't work on a feature.
So instead of building a condition on my features, i'm using conditions on my components.
I used a system search that searched for the registry value 'test' with '1' as value data. The result was stored in the property INSTALLTEST.
In my component condition, i could use INSTALLTEST = '1' (value data had to be '1' ) or INSTALLTEST (registry value had to be found) to install that component.
This worked great but i wonder why it won't work on a feature.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
10:51 AM
I'm not sure either, I'm running into a very similar problem with making FLEXnet Connect Agent install controllable via Property condition on a feature. No dice there either.
I'm starting to miss WISE...
I'm starting to miss WISE...
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
11:21 AM
Feature conditions work substantially different than Component Conditions. This thread was specific to Component conditions.
The system search should really take care of that possibility, but if it does not then removing the property as suggested would be a good idea.
I'm not too sure if it does or does not honestly.
You might want to check the properties list to see if IS created the value there. If your condition goes like "IS_SOMETHING_INSTALLED" then if it's in the property table at all, it can allow this to get evaluated as true. If present - delete it.
The system search should really take care of that possibility, but if it does not then removing the property as suggested would be a good idea.
I'm not too sure if it does or does not honestly.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
11:30 AM
I just can't get this to work for my component. I tried to "dumb" it down to see if it would work for a simple test as looking for notepad.exe. I created a System Search based on Notepad being present so my property is NOTEPAD. I enter this into the component condition with Not NOTEPAD, so it should only install if Notepad is not present. Well, now it never installs the component? Why? I also can't get logging to work so I have been unable to determine what value the Property NOTEPAD has? I'm not sure what I'm doing wrong, n but this is extremely frustarting for what appears to be a simple task! Can anyone please shed some light on this for me
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
11:32 AM
What about logging isn't working for you?
[edit]
Just for clarification, you can create a log file by following the below directions:
http://support.installshield.com/kb/view.asp?articleid=Q104807
I would create one and then post it up real quick 🙂
[/edit]
[edit]
Just for clarification, you can create a log file by following the below directions:
http://support.installshield.com/kb/view.asp?articleid=Q104807
I would create one and then post it up real quick 🙂
[/edit]
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
11:40 AM
I thought if you enable logging from the Product Properties, and since I'm installing on a Vista machine, that it would automatically create the log file after installation? Is this not true?
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
11:51 AM
It should yes, but if you've having issues it might be more speedy to just manually generate the log file anyway.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
03:08 PM
I got a suggestion on this forum to use the commandline, which i do now and it generates the log decently:
setup.exe /V"/L*v C:\everything.log"
Pay attention to the ", i got that wrong when i tried the first time. Now i use it in a .bat file witth the path to my setup.exe.
setup.exe /V"/L*v C:\everything.log"
Pay attention to the ", i got that wrong when i tried the first time. Now i use it in a .bat file witth the path to my setup.exe.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
03:37 PM
Well, upon further testing, it looks like if I use the condition Not NOTEPAD, my component NEVER installs (w/ and w/o notepad present in Windows Folder) and if I use the condition NOTEPAD (w/ and w/o notepad present in Windows Folder), my component ALWAYS installs. I can't believe this is so hard that I'm wasting all these hours just trying to perform this simple operation. I hope someone can shed some light on this for me. I have attached my log w/ the condition NOTEPAD
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2008
11:47 PM
This line shows that it has found the notepad.exe file:
[16:42:56:596]: PROPERTY CHANGE: Adding NOTEPAD property. Its value is 'C:\Windows\'
Which means that you can use in the component condition if you want to install the component if notepad is present:
"NOTEPAD" or "NOTEPAD = "c:\windows\"" (don't use the outer " if you copy/paste this)
[16:42:56:596]: PROPERTY CHANGE: Adding NOTEPAD property. Its value is 'C:\Windows\'
Which means that you can use in the component condition if you want to install the component if notepad is present:
"NOTEPAD" or "NOTEPAD = "c:\windows\"" (don't use the outer " if you copy/paste this)