Properties in file names at runtime - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Properties in file names at runtime

Hi,
I know there are PseudoFormatted and Formatted properties. The former are used at build time.
What I want to do is have a file called [Property].xxx which is loaded into a specific directory as an attached file.
All I get at run time is a file called [Property].xxx without it having replaced the property with it's value.
How do I do this please?

Regards,
John
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Properties in file names at runtime

Hi John,
I know there are PseudoFormatted and Formatted properties. The former are used at build time.
No, actually those are data types. Properties referenced by PseudoFormatted data types are resolved at build time while properties referenced by Formatted data types are resolved at runtime.
Public and private properties are explained in "Windows Installer Properties" article.

The file's "Name" text field is of PseudoFormatted data type and you can localize its value as described in the "File Properties Tab" article.
To localize it you can follow our related How do I localize the value of a property based on the OS language article. Starting with the next Advanced Installer release the localization will be much easier by using the new Dictionary Editor feature.
How do I do this please?
Can you please describe the exact functionality you are trying to achieve by referencing the file name with a property this way?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Properties in file names at runtime

Hi,

I have solved my problem by string substitution in SQL script and copying using xp_commandshell.

I was trying to attach a file in files and folders and use a property to name the file. This is not allowed apparently.

Thanks,
John
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Properties in file names at runtime

Hi John,
I was trying to attach a file in files and folders and use a property to name the file. This is not allowed apparently.
You can use a property which is resolved at build time not at install time. Here's another thread that discusses this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”