PDA

View Full Version : New to SF6 and have a couple of ?'s


DaTaSPiKe
12-30-2003, 06:57 PM
Hey all... using the product for really the first time and I am somewhat at a loss.

Here is what I am trying to do.

Have an application that is already installed, but I only want to update a couple of files.

Question 1:

In my actions section I have put the following statement:

Search for File (%MyFileName% = location of MyFileName.exe)

Now does the %MyFileName% variable include just the location of the file or does it just tell me if the file exists or not?

Question 2:

This question relates directly to question 1.

Using the above variable %MyFileName% how do use it's value to justify a condition of a file I want to install?

If possible give me the code that I would need to put into the "Conditions" section of a file that is to be added to the package. (See picture below)

I hope that I explained what I want to do, and thanks in advance for your help.

Chris

Darryl
01-05-2004, 04:12 PM
Question 1) The following is taken from the Help docs for the Search for File action which should answer your question:

*********************************************
Store result in variable:
The name of the variable to store the result in. The result will be a semi-colon delimited list of paths where the file was found. For example, "C:\Program Files\Yourfile.exe;C:\Backup\Yourfile.exe". You can use the Count Delimited Strings and Get Delimited String actions to parse the returned value into individual paths and filenames.

Default value:
This is the default value of the Store result in variable variable. The variable will be set to this default value if the file being searched for is not found.
***********************************************

So if the contents of the variable doesn't equal the "Default value", that means that the file wasn't found on the user's system. So as an example, if "NOT FOUND" was your "Default Value", you could have a condition such as:

%MyFileName% <> "NOT FOUND"

That condition means, only install the file if the contents of the search does not equal the default value.

Hope that helps.