Parsing a file in a custom action - Advanced Installer Community
ThomasE
Posts: 6
Joined: Sat Sep 29, 2012 7:54 am

Parsing a file in a custom action

I would like to create a custom action that parses an XML file that is installed from my setup as a temporary file. The file will installed "temporary" in "Windows Volume\Temporary". I know you to get it in the code with: session["TempFolder"]. But the file itself is then in a subfolder of this directory like MSIxyz

How can I find out in the Custom action code where my file will be located?
jjones
Posts: 68
Joined: Wed Jun 29, 2011 3:30 pm

Re: Parsing a file in a custom action

How are you doing the parsing, a vb script or a C# function?
ThomasE
Posts: 6
Joined: Sat Sep 29, 2012 7:54 am

Re: Parsing a file in a custom action

jjones wrote:How are you doing the parsing, a vb script or a C# function?
with a C# function. But the parsing is not the problem. I just want to know WHERE is the file (i.e. in which directory) exactly? This is what I need to know in the custom action.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Parsing a file in a custom action

Hello,

In order to reference the related file through your custom action you can use its associated property. Go to "Files and Folders" page, select the related file and from its context menu choose "Properties...". You can use the associated property from "Edit Temporary File" dialog.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”