Command Reference

Parse Path

Parses a string that contains a path to retrieve specific information from it, such as the filename or the drive letter.

Action ID: 72
Action Category: Strings

Settings

Store result in variable:

The name of the variable to store the result in.

Source path:

The path that you would like to parse.

Information to store:

The information that Setup Factory will store in the Store result in variable variable. Choose from:

Return Values

None.

Example

In this example, we will parse a string that contains the path to a previous installation of our product.

We have already stored the path to the previous main executable in the variable %PrevPath%. The problem with %PrevPath% is that it contains our main executable's filename (i.e. C:\Program Files\My Install\MainRun.exe) but we only want the drive and folder names.

We will store the result in: %AppDir%

Note: It is not generally a good idea to modify %AppDir% unless you are an advanced user.

Store result in variable: %AppDir%
Source Path: %PrevPath%
Information to store: Drive and folder ("C:\Folder1\Folder2")

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab