Property was set to Default value - 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!

RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Property was set to Default value

Hello,

I have another problem with the CustomActions...

After the files are copied to the install folder, I need to make changes on the licensefile. The license file is beeing installed, like the other files in the install directory. The changes are made by an CustomAction dll, which does. But When I execute the action, the values of these properties are set back to their default values. But I need some property values, which where set before the installation started.

As you can see in the attached Runlog, the property "LFPath" is set to the full path of the license file, later when the installation fails, the value is set to its default value. How can I path these values to my action?
In this example, it is just the path to the file, and there are other ways to get that path. But that seems to be impossible with other values...
Is it only possible to pass these values through a temporary file to the action? Or is there a way use the Properties?

Thanks,
Tobias
Attachments
Protest_RUNLOG.txt
(73 KiB) Downloaded 284 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property was set to Default value

Hi Tobias,

Due to the fact that properties can not be directly accessed from within a deferred custom action, the value of the properties that need to be passed to the custom action will be placed in the "Action Data" field of that custom action. The content of this field can be accessed from the custom action by retrieving the value of [CustomActionData].
For more information, please read the following article:
http://www.advancedinstaller.com/user-g ... rties.html

Also, please keep in mind for those custom actions which modify the system it is recommended to have Rollback correspondents which undo their actions should a Installer Rollback operation appear.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Re: Property was set to Default value

Hello Mihai,

I'll take a look on that article, but I'd like to add, that I set the execution option to "Immediate execution" not "Deferred". If I'd try to get access to the installer properties in a deffered action, it would throw an exception anyway. But it would be another exception, not the one I catched in my action.

I also logged the property value myself before I tried to use it:
FILE EXISTS _Your Value_: False

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

Re: Property was set to Default value

Hello Tobias,

Can you please specify what kind of .DLL you are using as a custom action( Win32 or .NET )? Also, please send us the .AIP( project file ) to support at advancedinstaller dot com so we can see what you mean.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Re: Property was set to Default value

Hello Mihai,

I've send you the requested aip file.
I prepared a smaller new sample project, which does only contain the problematic part.

The DLL is a .Net DLL.
But it looks like, that I can achieve what I need, with the ActionData.

Thank you and all the best,
Tobias
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Property was set to Default value

Hi Tobias,

Can you please try to use public properties( uppercase letters )?
http://www.advancedinstaller.com/user-g ... rties.html

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

Return to “Common Problems”