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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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
Answered 10/02/2007 by: VBScab
Red Belt

Please log in to comment
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.
Answered 10/02/2007 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
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.
Answered 10/02/2007 by: VBScab
Red Belt

Please log in to comment
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.
Answered 10/02/2007 by: AngelD
Red Belt

Please log in to comment
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
Answered 10/04/2007 by: JimmPanik
Orange Belt

Please log in to comment
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.
Answered 10/04/2007 by: VBScab
Red Belt

Please log in to comment
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.
Answered 10/04/2007 by: blacklisted_packager
Orange Belt

Please log in to comment
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
Answered 10/04/2007 by: VBScab
Red Belt

Please log in to comment
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
Answered 10/05/2007 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
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.
Answered 10/05/2007 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity