tnomore
Posts: 16
Joined: Wed Oct 31, 2007 5:14 pm

.NET Custom Action Function Name?

Hi.

I have created a DLL that contains the required pre-requisites:
-Inherits from Installer class
-RunInstaller=true

It contains minimal information in the Commit event:

Code: Select all

        public override void Commit(System.Collections.IDictionary savedState)
        {
            base.Commit(savedState);
            System.Windows.Forms.MessageBox.Show("From Custom Install");
        }
My custom action is in the "Commit" sequence and its properties are as follows:

ActionData: /LogFile= /ReqVersion=2.0.50727 /InstallType=notransaction /Action=Commit "[#InstallLibary.dll]" "[TempFolder]dotNetCustAct.dll_Config.xml"

Function Name: MyFuntion

What is the proper Function Name to provide? It will not accept an empty name and "Commit" does not work.

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

Hi,

Please note that for a .NET custom action the "Source Path", "Source Type" and "Function Name" fields should remain unchanged.
What is the proper Function Name to provide?
The proper Function Name is the default one:

Code: Select all

LaunchDotNetCustomAction
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tnomore
Posts: 16
Joined: Wed Oct 31, 2007 5:14 pm

Thanks cosmin, appreciate your service.

For some reason, I was not getting the default value "LaunchDotNetCustomAction".
tnomore
Posts: 16
Joined: Wed Oct 31, 2007 5:14 pm

Another question for you:

I would like to pass the location of the local installation directory to the custom task.

C:\Program Files\MyCompany\MyInstallation\

I attempted to use an ActionData as follows:

/FileLocation=[APPDIR]

This causes an error whenever the task runs. Since I can pass data that does not represent a file path, I assume this is an issue interpreting the string "C:\Program Files\MyCompany\MyInstallation\".

Any thoughts and/or guidance?

thanks
tnomore
Posts: 16
Joined: Wed Oct 31, 2007 5:14 pm

Found the answer in this post:

http://www.advancedinstaller.com/forums ... ght=appdir

Added a space after [APPDIR], as in "[APPDIR] ".
Though, not sure why this fix is effective.
Quadiago
Posts: 71
Joined: Thu May 31, 2007 9:07 am

While on .net installer class custom actions, I'd like to ask how, if possible, you can pass back information to the install during the UI sequence? From what I've heard it is impossible, meaning that these types of actions are only usefull during the execute sequence?

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

Hi,
While on .net installer class custom actions, I'd like to ask how, if possible, you can pass back information to the install during the UI sequence?
I'm afraid that you cannot use a .NET custom action in the User Interface section of the installation. Normally, these type of custom actions are used for installing assemblies and they are set in InstallExecuteSequence.

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

Return to “Common Problems”