marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

.NET Action doesn't get the Property set on custom dialog

Mon Nov 19, 2007 5:52 pm

Hi There,


I have a custom dialog that stores some information about the installation (a name) and I created a .NET custom action that will use that information to run a configuration after the installation is done.
My Dialog has txtOrgName property for the textbox, and on my .net custom action I have (on the Install folder) i have a Class parameter txtOrgName with a value of [txtOrgName].

When I run the installation, and attach the debugger to that installer class, I can see that the value of txtOrgName is blank.

On "Execution Option" I tried "Immediate", "Deferred" and even "Commit"

Here is my "Action Data" string:

/LogFile= /ReqVersion=2.0.50727 /InstallType=notransaction /Action=Install /APPDIR="[APPDIR] " /IISSERVERNAME="[IISSERVERNAME]" /txtVirDir="[txtVirtualDirectory]" /txtOrganization="[txtOrgName]" "[#TppHtmConfig.exe]" "[TempFolder]dotNetCustAct.dll_Config.xml"

How can I pass this value to the .NET installer class?

Thanks,
Marcelo.

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Mon Nov 19, 2007 6:27 pm

Hi,

The value of the "txtOrgName" property is blank because it is a private property. You should use a public property (all uppercase letters) in order to have access to the value of the property (for example TXTORGNAME).

You can read more about properties here:
http://msdn2.microsoft.com/en-us/library/aa367437.aspx
http://msdn2.microsoft.com/en-us/library/aa367437.aspx
http://msdn2.microsoft.com/en-us/library/aa370851.aspx
http://www.advancedinstaller.com/user-g ... rties.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Mon Nov 19, 2007 6:47 pm

Hi Cosmin,

That did work, but I don't understand why the property "txtVirtualDirectory" is not in capitals and it DOES return the correct value..? That is another textbox on the same dialog where txtOrgName is.

Am I missing something in the explanation?

Thanks,
Marcelo

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Tue Nov 20, 2007 9:14 am

Hi,

I'm not sure why "txtVirtualDirectory" property stores the value given by the user, but private properties cannot pass their values from the InstallUISequence (the user interface) to the InstallExecuteSequence (the actual installation process).

Perhaps you are using this property in a different way than you are using the "txtOrgName" property.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”