Hello Sonda,
Please keep in mind that Installer Properties are available only during the
immediate stage of the install execution process. After this stage is complete all property values are set to empty strings.
The exception to this rule is the special
CustomActionData property which keeps its values through all of the stages even during deferred, rollback and commit.
Before we begin, please have a look on our
"Run Inline PowerShell Script" article where it is described how one can get a property value into a script (for deferred custom actions).
Now, in order to achieve what you want, you can follow the upcoming step-by-step process:
- Please go to
"Search" page and create a search for the file that you want to be removed. To do so, you can create a "File Search" type of search.
- Now please go to "Custom Actions" page.
- Here add a
"Run Inline PowerShell Script" custom action
with sequence. In order to do so, simply press the "Add custom action with sequence" button which is place to the right side of the custom action's name.
- Now it is time to configure the Custom Action. In the "Parameters" field, insert the following:
Now it is time to update the Param() block of the script, which must be on the first line, as follows:
Now, under the "# Your code goes here." comment, please add the following line:
This way, upon installing the setup, your file should be successfully removed.
Hope this helps.
All the best,
Catalin
FOLLOW US
Get the latest news in Application Packaging