/build/static/layout/Breadcrumb_cap_w.png

conditions and properties

Good day,

I am struggling with something that seems rather simple yet complicated at the same time. I have a property I created PRINT_MANAGER that is the result of a system search for a series of files that could exist. All four searches use the same property name.

Example:
c:\temp\somefile.txt – if found PRINT_MANAGER should contain this file and path.
c:\windows\temp\somefile.txt – again, if found, PRINT_MANAGER should contain the file and path.
The same for the other two file locations.

I do not need to know which file is found, only that one is found. The SDK states that the searches are not performed in any order. That’s fine since I do not need to know the file. My question is the result I am getting.

To avoid the error of a blank property record, I enter that PRINT_MANAGER = “FALSE”. When a file is found, I see in the condition evaluation that PRINT_MANAGER = “FALSE” returns FALSE. Makes sense so far. If I test for a true result, I get something that I do not exist. PRINT_MANAGER = TRUE also returns false. If I test further and say NOT PRINT_MANAGER = “FALSE” I get a TRUE.

How do these expressions work and why can there not be an easy to evaluate a true / false condition?

Thanks,
Jimm

0 Comments   [ + ] Show comments

Answers (10)

Posted by: anonymous_9363 16 years ago
Red Belt
0
You answered your own question, where you say

- c:\temp\somefile.txt – if found PRINT_MANAGER should contain this file and path.

Therefore a test for PRINT_MANAGER not being FALSE returns TRUE - because PRINT_MANAGER=c:\temp\somefile.txt, or the path of one of your other test files. So, the condition to use is PRINT_MANAGER <> FALSE
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
ORIGINAL: VBScab
- c:\temp\somefile.txt – if found PRINT_MANAGER should contain this file and path.
Therefore a test for PRINT_MANAGER not being FALSE returns TRUE - because PRINT_MANAGER=c:\temp\somefile.txt, or the path of one of your other test files. So, the condition to use is PRINT_MANAGER <> FALSE

It also occurs to me that if one file that since he is using the property for all 4 files, if does not exist and is searched for after one that does exist, then the property will be blank when it should not be.
Posted by: anonymous_9363 16 years ago
Red Belt
0
Is that how it works? Really? If that's the case, I'd be looking at a script in a Custom Action to set the property. As soon as one file from the list is found, set the property and exit the loop.
Posted by: AngelD 16 years ago
Red Belt
0
When using AppSearch do not pre-define the property, in this case PRINT_MANAGER.
Then use PRINT_MANAGER as the condition. If AppSearch did find any of the file then the property will be created and PRINT_MANAGER property will be resolved to true in that case as it includes the path to the file or how you setup the AppSearch configuration for this property.
Posted by: JimmPanik 16 years ago
Orange Belt
0
Please clarify - it is my understanding that multiple searches with the same property name work as follows:

If the first search returns a value, the property is true and the search ends. If the first is not found, the next continues but in no order. If all searches fail, the property is assigned a null which will test as false.

Jimm
Posted by: anonymous_9363 16 years ago
Red Belt
0
Exactly, hence my query " Is that how it works? Really?" earlier on in the thread.

I guess the thing to do is run it through a debugger and watch the property.
Posted by: blacklisted_packager 16 years ago
Orange Belt
0
Hi VBScab ,
just curious to know ...what does running a debugger mean.. i tried to log but was unable to find the property in the log file..Is there a way i can find the property and how the value changes during execution.
Posted by: anonymous_9363 16 years ago
Red Belt
0
- WPS has a 'Debug' option. I presume InstallShield has similar functionality.

If not, try DebugView for Windows from SysInternals (now subsumed into the Microsoft behemoth)
- Download and install DebugView. Nice, discrete, stand-alone app, like most SysInternals tools.
- Create a registry value 'Debug' under HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer and set the data to '2'
- Start DebugView either on the local machine or by connecting remotely to the target machine. MSI installations will now write their output to the debug port and this will be displayed in DebugView
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
ORIGINAL: VBScab

Is that how it works? Really? If that's the case, I'd be looking at a script in a Custom Action to set the property. As soon as one file from the list is found, set the property and exit the loop.


Actually, judging from my own tests and posts of others, it is not. If ANY of the files exist the property would be populated. The non-existence of one would not null it out.
O
Posted by: AngelD 16 years ago
Red Belt
0
I can't quite understand what you are trying to achive but maybe using the CCPSearch action instead would be more suiteable.
From the SDK:
The CCPSearch action searches for file signatures listed in the CCPSearch table on the system using the following tables in order: Signature, CompLocator, RegLocator, IniLocator, and DrLocator.
If any signature is determined to exist, the CCP_Success property is set to 1 and the CCPSearch action terminates.
As the CCP_Success property is not defined by default I would use CCP_Success as the condition, if any file is found the condition will resolve to true and if you want to do something if no file were found then use NOT CCP_Success as the condition instead.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ