murug86
Posts: 52
Joined: Mon May 21, 2012 10:59 am

Property Set with Formatted

Hi,

First, I added a 'New Property' in "Instal Parameters" Page
Second, I added a 'Property Based Folder' in "Files & Folders" Page
Third, I added a 'Path Edit' control with this property as 'Property Name' in "Dialogs" Page
Finally, I have a 'Property Set with Formatted' custom action which presets a value to the property, in "Custom Actions" Page
I need this preset value, to be the path of a folder in the Application Folder; as seen below : I'v selected the webapps folder.
Property Set with Formatted.png
Property Set with Formatted.png (54.84 KiB) Viewed 6958 times

BUT, during installation, the value in the 'path edit' is the name of that PROPERTY, as seen below:
ServerHome.png
ServerHome.png (20.45 KiB) Viewed 6958 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property Set with Formatted

Hello,

This is happening because that folder (webapps_Dir) is resolved during a later standard action (CostFinalize).

Also, a property used by a property-based folder must contain a valid path. If this is not the case and the path cannot be resolved, the installation will fail. Keeping this in mind you should move Initialize_SMARTE_SERVER_HOME after CostFinalize standard action and add another similar custom action after Begin that sets SMARTE_SERVER_HOME to [WindowsVolume] for example (this path should exist on any machine).

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
murug86
Posts: 52
Joined: Mon May 21, 2012 10:59 am

Re: Property Set with Formatted

Hi Mihai..
mihai.petcu wrote:Also, a property used by a property-based folder must contain a valid path.
Yes, I know. I'm obtaining this from the 'Path Edit' control [ Server Home : ]
mihai.petcu wrote:add another similar custom action after Begin that sets SMARTE_SERVER_HOME to [WindowsVolume]
I am able to do this too. By default it shows C:\

BUT, I was hoping to be able to show a different value by default (instead of showing { c:\ }).

Just let me know IF this is possible.. :)
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property Set with Formatted

Hello,

Yes it is. Have you tried configuring the custom actions like I mentioned in my previous post?
-> add a "Property set with Formatted" custom action after Begin that sets SMARTE_SERVER_HOME to [WindowsVolume]
-> move Initialize_SMARTE_SERVER_HOME custom action after CostFinalize

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
murug86
Posts: 52
Joined: Mon May 21, 2012 10:59 am

Re: Property Set with Formatted

Sorry Mihai..

I understood it only when you stated it as two separate points. :)

I did it. It worked. Awesome.. :)

For other visitors :
First enabled the "Cost finalise" inside the 'InstallUIsequence' stage.
Then moved the Initialize_SMARTE_SERVER_HOME under it.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property Set with Formatted

No problem, glad you solved the issue.

Return to “Common Problems”